1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

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.

llvm-svn: 212354
This commit is contained in:
Rafael Espindola 2014-07-04 19:31:27 +00:00
parent 749fa5fa81
commit 358cb0ff7d

View File

@ -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) {