[lld] r275524 - Inline a vairable that is used only once. NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 14 19:42:18 PDT 2016
Author: ruiu
Date: Thu Jul 14 21:42:18 2016
New Revision: 275524
URL: http://llvm.org/viewvc/llvm-project?rev=275524&view=rev
Log:
Inline a vairable that is used only once. NFC.
Modified:
lld/trunk/ELF/LTO.cpp
Modified: lld/trunk/ELF/LTO.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LTO.cpp?rev=275524&r1=275523&r2=275524&view=diff
==============================================================================
--- lld/trunk/ELF/LTO.cpp (original)
+++ lld/trunk/ELF/LTO.cpp Thu Jul 14 21:42:18 2016
@@ -297,16 +297,14 @@ std::vector<std::unique_ptr<InputFile>>
const Target *T = TargetRegistry::lookupTarget(TheTriple, Msg);
if (!T)
fatal("target not found: " + Msg);
- TargetOptions Options = InitTargetOptionsFromCodeGenFlags();
- // lld supports the new relocations.
+ // LLD supports the new relocations.
+ TargetOptions Options = InitTargetOptionsFromCodeGenFlags();
Options.RelaxELFRelocations = true;
- Reloc::Model R = Config->Pic ? Reloc::PIC_ : Reloc::Static;
-
auto CreateTargetMachine = [&]() {
- return std::unique_ptr<TargetMachine>(
- T->createTargetMachine(TheTriple, "", "", Options, R));
+ return std::unique_ptr<TargetMachine>(T->createTargetMachine(
+ TheTriple, "", "", Options, Config->Pic ? Reloc::PIC_ : Reloc::Static));
};
std::unique_ptr<TargetMachine> TM = CreateTargetMachine();
More information about the llvm-commits
mailing list