From f5db0b36ff3b776a7c7119d9149c62661daa7228 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Mon, 25 Sep 2017 17:19:17 +0000 Subject: [PATCH] Use a temporary varaible to improve readability. NFC. llvm-svn: 314120 --- lld/ELF/LinkerScript.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index db87af8823db..0baa2129bedc 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -436,15 +436,11 @@ void LinkerScript::fabricateDefaultCommands() { for (auto &KV : Config->SectionStartMap) StartAddr = std::min(StartAddr, KV.second); + auto Expr = [=] { + return std::min(StartAddr, Config->ImageBase + elf::getHeaderSize()); + }; Opt.Commands.insert(Opt.Commands.begin(), - make(".", - [=] { - return std::min( - StartAddr, - Config->ImageBase + - elf::getHeaderSize()); - }, - "")); + make(".", Expr, "")); } // Add sections that didn't match any sections command.