Skip to content

Commit

Permalink
Ignore llvm specific symbols in the LTOModule.
Browse files Browse the repository at this point in the history
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212354 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
espindola committed Jul 4, 2014
1 parent ca57933 commit e97c25b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/LTO/LTOModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,9 @@ bool LTOModule::parseSymbols(std::string &errMsg) {
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) {
Expand Down

0 comments on commit e97c25b

Please sign in to comment.