forked from OSchip/llvm-project
[LTO] Avoid repeated Triple construction. NFC
This commit is contained in:
parent
b12e4c17e0
commit
595c418ad6
|
@ -537,12 +537,12 @@ void LTO::addModuleToGlobalRes(ArrayRef<InputFile::Symbol> Syms,
|
||||||
auto *ResI = Res.begin();
|
auto *ResI = Res.begin();
|
||||||
auto *ResE = Res.end();
|
auto *ResE = Res.end();
|
||||||
(void)ResE;
|
(void)ResE;
|
||||||
|
const Triple TT(RegularLTO.CombinedModule->getTargetTriple());
|
||||||
for (const InputFile::Symbol &Sym : Syms) {
|
for (const InputFile::Symbol &Sym : Syms) {
|
||||||
assert(ResI != ResE);
|
assert(ResI != ResE);
|
||||||
SymbolResolution Res = *ResI++;
|
SymbolResolution Res = *ResI++;
|
||||||
|
|
||||||
StringRef Name = Sym.getName();
|
StringRef Name = Sym.getName();
|
||||||
Triple TT(RegularLTO.CombinedModule->getTargetTriple());
|
|
||||||
// Strip the __imp_ prefix from COFF dllimport symbols (similar to the
|
// Strip the __imp_ prefix from COFF dllimport symbols (similar to the
|
||||||
// way they are handled by lld), otherwise we can end up with two
|
// 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).
|
// global resolutions (one with and one for a copy of the symbol without).
|
||||||
|
|
Loading…
Reference in New Issue