For ThinLTO importing we don't need to import all the fields of the DICompileUnit, such as enums, macros, retained types lists. The importation of those fields were previously disabled by setting their value map entries to nullptr. Unfortunately a metadata node can be shared by multiple metadata operands. Setting the map entry to nullptr might result in not importing other metadata unexpectedly. The issue is fixed by explicitly setting the original DICompileUnit fields (still a copy of the source module metadata) to null.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM. @tejohnson appreciate if you could take a look too, thanks. (this is blocking an internal usage for us)
llvm/test/ThinLTO/X86/import-metadata.ll | ||
---|---|---|
38 | Just curious, any reason for !5 = !{!4, !4} instead of !5 = !{!4}? |
s/metadta/metadata/