[PATCH] D26840: [ThinLTO] Fix crash when importing an opaque type

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 18 06:45:20 PST 2016


tejohnson added a comment.

> ThinLTO skips this because @foo is not imported and goes directly
>  to the next stage.

I see - because @foo is in the importing module, so it isn't IR linked in like in the monolithic case where all modules are linked in, right?

A couple questions:

- I see that the DstStructTypesSet in the IRLinker's TypeMap is initialized from the IdentifiedStructTypes built from the types in the original (importing) module in the IRMover constructor. This adds all the struct types to either the Opaque or NonOpaque sets. Why isn't the opaque type in the original importing (Dst) module being added appropriately there?
- What about adding to the NonOpaque set? If we're missing cases of adding opaque types are we similarly missing adding non-opaque types?



================
Comment at: llvm/test/ThinLTO/X86/Inputs/import_opaque_type.ll:16
+}
\ No newline at end of file

----------------
Add newline


================
Comment at: llvm/test/ThinLTO/X86/import_opaque_type.ll:28
+}
\ No newline at end of file

----------------
Add newline


https://reviews.llvm.org/D26840





More information about the llvm-commits mailing list