Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
lld/ELF/LTO.cpp
Show First 20 Lines • Show All 130 Lines • ▼ Show 20 Lines | for (const lto::InputFile::Symbol &ObjSym : Obj.symbols()) { | ||||
// Once IRObjectFile is fixed to report only one symbol this hack can | // Once IRObjectFile is fixed to report only one symbol this hack can | ||||
// be removed. | // be removed. | ||||
R.Prevailing = !ObjSym.isUndefined() && B->File == &F; | R.Prevailing = !ObjSym.isUndefined() && B->File == &F; | ||||
R.VisibleToRegularObj = | R.VisibleToRegularObj = | ||||
Sym->IsUsedInRegularObj || (R.Prevailing && Sym->includeInDynsym()); | Sym->IsUsedInRegularObj || (R.Prevailing && Sym->includeInDynsym()); | ||||
if (R.Prevailing) | if (R.Prevailing) | ||||
undefine(Sym); | undefine(Sym); | ||||
R.LinkerRedefined = Config->RenamedSymbols.find(Sym) != | |||||
pcc: I think this can just be `Config->RenamedSymbols.count(Sym)`. | |||||
Config->RenamedSymbols.end(); | |||||
} | } | ||||
checkError(LTOObj->add(std::move(F.Obj), Resols)); | checkError(LTOObj->add(std::move(F.Obj), Resols)); | ||||
} | } | ||||
// Merge all the bitcode files we have seen, codegen the result | // Merge all the bitcode files we have seen, codegen the result | ||||
// and return the resulting ObjectFile(s). | // and return the resulting ObjectFile(s). | ||||
std::vector<InputFile *> BitcodeCompiler::compile() { | std::vector<InputFile *> BitcodeCompiler::compile() { | ||||
std::vector<InputFile *> Ret; | std::vector<InputFile *> Ret; | ||||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |
I think this can just be Config->RenamedSymbols.count(Sym).