CFI is using intrinsics that takes MDString as arguments, and this
was broken during lazy-loading of metadata.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Unfortunately this doesn't seem to entirely fix the CFI issue. With this patch applied I get these assertion failures for the attached test case (llvm-lto2 @resolution.txt -o /tmp/foo):
invalid local scope !18644 = distinct !DILexicalBlock(scope: null, file: !5600, line: 137, column: 2) invalid local scope !18685 = distinct !DILexicalBlock(scope: null, file: !5600, line: 164, column: 2) llvm-lto2: [...]/include/llvm/Support/Casting.h:95: static bool llvm::isa_impl_cl<llvm::DILocalScope, const llvm::Metadata *>::doit(const From *) [To = llvm::DILocalScope, From = const llvm::Metadata *]: Assertion `Val && "isa<> used on a null pointer"' failed. Aborted (core dumped)
If I pass -disable-ondemand-mds-loading or if I revert this patch I get the "expected" behaviour ("expected" because of incomplete support for CFI on trunk):
Can't get register for value! UNREACHABLE executed at [...]/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:1202!
Comment Actions
Fix the test case reported by pcc: obviously adding a PlaceholderQueue requires to flush it at some point...
I'll add an assert in the PlaceholderQueue destructor in a separate commit.
Comment Actions
Assertions added in r292597.
llvm/lib/Bitcode/Reader/MetadataLoader.cpp | ||
---|---|---|
502 ↗ | (On Diff #85110) | This was missing ^^ |