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

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 18 08:30:37 PST 2016


mehdi_amini added a comment.

>> 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()) {
> 
> So at that point we are detecting the dest opaque type as a StructType, so why wouldn't we catch those here too?

Sorry I was wrong in my first walkthrough, the issue is that we initialize the type finder with:

`StructTypes.run(M, true);`

The "true" means "OnlyNamed", this is why we don't have it. I have no idea why it only gets the named one here or what would be the impact to get them all.


https://reviews.llvm.org/D26840





More information about the llvm-commits mailing list