[llvm] r212354 - Ignore llvm specific symbols in the LTOModule.

Rafael Espindola rafael.espindola at gmail.com
Fri Jul 4 12:31:28 PDT 2014


Author: rafael
Date: Fri Jul  4 14:31:27 2014
New Revision: 212354

URL: http://llvm.org/viewvc/llvm-project?rev=212354&view=rev
Log:
Ignore llvm specific symbols in the LTOModule.

These are the llvm.* globals and functions.

I don't think it is possible to test this directly since llvm-lto is not
a full linker and will not report duplicated symbols, but this fixes
bootstrap with gold and lto enabled.

Modified:
    llvm/trunk/lib/LTO/LTOModule.cpp

Modified: llvm/trunk/lib/LTO/LTOModule.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/LTOModule.cpp?rev=212354&r1=212353&r2=212354&view=diff
==============================================================================
--- llvm/trunk/lib/LTO/LTOModule.cpp (original)
+++ llvm/trunk/lib/LTO/LTOModule.cpp Fri Jul  4 14:31:27 2014
@@ -531,6 +531,9 @@ bool LTOModule::parseSymbols(std::string
   for (auto &Sym : IRFile->symbols()) {
     const GlobalValue *GV = IRFile->getSymbolGV(Sym.getRawDataRefImpl());
     uint32_t Flags = Sym.getFlags();
+    if (Flags & object::BasicSymbolRef::SF_FormatSpecific)
+      continue;
+
     bool IsUndefined = Flags & object::BasicSymbolRef::SF_Undefined;
 
     if (!GV) {





More information about the llvm-commits mailing list