[lld] r299171 - Revert r299168 and r299169 due to library dependency issues.
Peter Collingbourne via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 30 19:44:50 PDT 2017
Author: pcc
Date: Thu Mar 30 21:44:50 2017
New Revision: 299171
URL: http://llvm.org/viewvc/llvm-project?rev=299171&view=rev
Log:
Revert r299168 and r299169 due to library dependency issues.
http://bb.pgr.jp/builders/i686-mingw32-RA-on-linux/builds/25073/steps/build_llvmclang/logs/stdio
Modified:
lld/trunk/COFF/InputFiles.cpp
lld/trunk/ELF/InputFiles.cpp
Modified: lld/trunk/COFF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/InputFiles.cpp?rev=299171&r1=299170&r2=299171&view=diff
==============================================================================
--- lld/trunk/COFF/InputFiles.cpp (original)
+++ lld/trunk/COFF/InputFiles.cpp Thu Mar 30 21:44:50 2017
@@ -355,12 +355,13 @@ void BitcodeFile::parse() {
SymbolBody *Alias = Symtab->addUndefined(Saver.save(Fallback));
checkAndSetWeakAlias(Symtab, this, Sym->body(), Alias);
} else {
- bool IsCOMDAT = ObjSym.getComdatIndex() != -1;
+ Expected<int> ComdatIndex = ObjSym.getComdatIndex();
+ bool IsCOMDAT = ComdatIndex && *ComdatIndex != -1;
Sym = Symtab->addRegular(this, SymName, IsCOMDAT);
}
SymbolBodies.push_back(Sym->body());
}
- Directives = Obj->getCOFFLinkerOpts();
+ Directives = check(Obj->getLinkerOpts());
}
MachineTypes BitcodeFile::getMachineType() {
Modified: lld/trunk/ELF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.cpp?rev=299171&r1=299170&r2=299171&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.cpp (original)
+++ lld/trunk/ELF/InputFiles.cpp Thu Mar 30 21:44:50 2017
@@ -818,7 +818,7 @@ static Symbol *createBitcodeSymbol(const
uint8_t Visibility = mapVisibility(ObjSym.getVisibility());
bool CanOmitFromDynSym = ObjSym.canBeOmittedFromSymbolTable();
- int C = ObjSym.getComdatIndex();
+ int C = check(ObjSym.getComdatIndex(), F->LogName);
if (C != -1 && !KeptComdats[C])
return Symtab<ELFT>::X->addUndefined(NameRef, /*IsLocal=*/false, Binding,
Visibility, Type, CanOmitFromDynSym,
@@ -855,8 +855,10 @@ void BitcodeFile::parse(DenseSet<CachedH
Obj = check(lto::InputFile::create(MBRef), this->LogName);
std::vector<bool> KeptComdats;
- for (StringRef S : Obj->getComdatTable())
- KeptComdats.push_back(ComdatGroups.insert(CachedHashStringRef(S)).second);
+ for (StringRef S : Obj->getComdatTable()) {
+ StringRef N = Saver.save(S);
+ KeptComdats.push_back(ComdatGroups.insert(CachedHashStringRef(N)).second);
+ }
for (const lto::InputFile::Symbol &ObjSym : Obj->symbols())
Symbols.push_back(createBitcodeSymbol<ELFT>(KeptComdats, ObjSym, this));
More information about the llvm-commits
mailing list