diff options
author | Fangrui Song <i@maskray.me> | 2021-09-28 13:39:41 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2021-09-28 13:39:41 -0700 |
commit | 595c418ad6a1230103000dcebdb158129d033077 (patch) | |
tree | 2aa14cf9e1b201012f936d475202e3ab89d60450 /llvm/lib/LTO/LTO.cpp | |
parent | b12e4c17e07b42559fea219034dd162de25df498 (diff) | |
download | llvm-595c418ad6a1230103000dcebdb158129d033077.zip llvm-595c418ad6a1230103000dcebdb158129d033077.tar.gz llvm-595c418ad6a1230103000dcebdb158129d033077.tar.bz2 |
[LTO] Avoid repeated Triple construction. NFC
Diffstat (limited to 'llvm/lib/LTO/LTO.cpp')
-rw-r--r-- | llvm/lib/LTO/LTO.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp index 86f38f5..111fdc8 100644 --- a/llvm/lib/LTO/LTO.cpp +++ b/llvm/lib/LTO/LTO.cpp @@ -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). |