[PATCH] D16440: [ThinLTO] Link in only necessary DICompileUnit operands

Akira Hatanaka via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 12 18:02:46 PST 2016


ahatanak added a subscriber: ahatanak.

================
Comment at: lib/Linker/IRMover.cpp:1374
@@ +1373,3 @@
+                    &GValMaterializer);
+    std::vector<DICompositeType *> RetainWorklist;
+    if (!IsMetadataLinkingPostpass) {
----------------
While I was building a project using thin-LTO, I found out that the call to MapMetadata here causes an assert if CU-getSubprograms().get() returns null (the assert is triggered in MapMetadataImpl when isa<MDString> is called on a null ptr). Should we check whether CU->getSubprograms() is empty before calling the function? Mehdi also suggested that we can do the check inside MapMetadaImpl and have it return null if the first argument is null. That might be better if there are other call sites that passes a null pointer as the first argument.


http://reviews.llvm.org/D16440





More information about the llvm-commits mailing list