[PATCH] D26840: [ThinLTO] Fix crash when importing an opaque type
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 18 07:52:42 PST 2016
tejohnson added a comment.
In https://reviews.llvm.org/D26840#599810, @mehdi_amini wrote:
> In https://reviews.llvm.org/D26840#599745, @tejohnson wrote:
>
> > - 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?
>
>
> Opaque type are not recognized as struct, this is dead code: addOpaque can't be called from here I believe.]
But the block of code you modified is only entered if we identify the dest type as a struct type:
if (cast<StructType>(DstTy)->isOpaque()) {
https://reviews.llvm.org/D26840
More information about the llvm-commits
mailing list