[PATCH] D20290: [ThinLTO] Change ODR resolution and internalization to be index-based
Mehdi AMINI via llvm-commits
llvm-commits at lists.llvm.org
Fri May 20 14:52:44 PDT 2016
joker.eph added a comment.
Can you rebase the patch as well?
================
Comment at: lib/LTO/ThinLTOCodeGenerator.cpp:129
@@ -121,22 +128,3 @@
});
- // If \p GV is not the first definition, give up...
- if ((*FirstDefForLinker)->modulePath() != ModulePath)
- return false;
- // If there is any strong definition anywhere, do not bother emitting this.
- if (llvm::any_of(
- GVSummaryList,
- [](const std::unique_ptr<GlobalValueSummary> &Summary) {
- auto Linkage = Summary->linkage();
- return !GlobalValue::isAvailableExternallyLinkage(Linkage) &&
- !GlobalValue::isWeakForLinker(Linkage);
- }))
- return false;
- return true;
-}
-
-static GlobalValue::LinkageTypes
-ResolveODR(const ModuleSummaryIndex &Index,
- const FunctionImporter::ExportSetTy &ExportList,
- const DenseSet<GlobalValue::GUID> &GUIDPreservedSymbols,
- StringRef ModuleIdentifier, GlobalValue::GUID GUID,
- const GlobalValueSummary &GV) {
+ assert(FirstDefForLinker != GVSummaryList.end());
+ return FirstDefForLinker->get();
----------------
I hit this assertion, extern template are emitted with available externally apparently.
http://reviews.llvm.org/D20290
More information about the llvm-commits
mailing list