[PATCH] D50066: [IRMover] Don't materialise values from different source module

Eugene Leviant via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 31 10:02:47 PDT 2018


evgeny777 added inline comments.


================
Comment at: test/ThinLTO/X86/fwd-decl.ll:23
+!llvm.module.flags = !{!0, !1}
+!llvm.dbg.cu = !{!2}
+!0 = !{i32 2, !"Debug Info Version", i32 3}
----------------
steven_wu wrote:
> I don't think debug info are relevant for the test case. You can remove them from both module.
No, I can't

The `DIFlagFwdDecl` forces IRMover to look for definition in a different module, which has also been loaded by LTO. This causes IRMover to see both `%struct.TA = type {}` and `%struct.TA = type opaque`  during a single move operation and make a mixture of types in a destination module. 

Removal of debug info also eliminates the error.


https://reviews.llvm.org/D50066





More information about the llvm-commits mailing list