diff options
| author | Rui Ueyama <ruiu@google.com> | 2016-07-15 02:42:18 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2016-07-15 02:42:18 +0000 |
| commit | a9d9eda0ceeb9eceec07989e2dafa0c3a5388395 (patch) | |
| tree | 09e20f389035e2f995d476fd43009357412e104b /lld/ELF/LTO.cpp | |
| parent | 48da5cf236c7b7f881a581ecca30a8d5ec8eb8b1 (diff) | |
| download | bcm5719-llvm-a9d9eda0ceeb9eceec07989e2dafa0c3a5388395.tar.gz bcm5719-llvm-a9d9eda0ceeb9eceec07989e2dafa0c3a5388395.zip | |
Inline a vairable that is used only once. NFC.
llvm-svn: 275524
Diffstat (limited to 'lld/ELF/LTO.cpp')
| -rw-r--r-- | lld/ELF/LTO.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lld/ELF/LTO.cpp b/lld/ELF/LTO.cpp index 4a7b1e745e8..64eb4cfd68f 100644 --- a/lld/ELF/LTO.cpp +++ b/lld/ELF/LTO.cpp @@ -297,16 +297,14 @@ std::vector<std::unique_ptr<InputFile>> BitcodeCompiler::compile() { 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(); |

