Skip to content

Commit

Permalink
[LTO] Avoid repeated Triple construction. NFC
Browse files Browse the repository at this point in the history
  • Loading branch information
MaskRay committed Sep 28, 2021
1 parent b12e4c1 commit 595c418
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/LTO/LTO.cpp
Expand Up @@ -537,12 +537,12 @@ void LTO::addModuleToGlobalRes(ArrayRef<InputFile::Symbol> Syms,
auto *ResI = Res.begin();
auto *ResE = Res.end();
(void)ResE;
const Triple TT(RegularLTO.CombinedModule->getTargetTriple());
for (const InputFile::Symbol &Sym : Syms) {
assert(ResI != ResE);
SymbolResolution Res = *ResI++;

StringRef Name = Sym.getName();
Triple TT(RegularLTO.CombinedModule->getTargetTriple());
// Strip the __imp_ prefix from COFF dllimport symbols (similar to the
// way they are handled by lld), otherwise we can end up with two
// global resolutions (one with and one for a copy of the symbol without).
Expand Down

0 comments on commit 595c418

Please sign in to comment.