[lld] r287324 - Omit empty parameter list.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 17 22:49:09 PST 2016
Author: ruiu
Date: Fri Nov 18 00:49:09 2016
New Revision: 287324
URL: http://llvm.org/viewvc/llvm-project?rev=287324&view=rev
Log:
Omit empty parameter list.
Modified:
lld/trunk/ELF/LinkerScript.cpp
lld/trunk/ELF/LinkerScript.h
Modified: lld/trunk/ELF/LinkerScript.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.cpp?rev=287324&r1=287323&r2=287324&view=diff
==============================================================================
--- lld/trunk/ELF/LinkerScript.cpp (original)
+++ lld/trunk/ELF/LinkerScript.cpp Fri Nov 18 00:49:09 2016
@@ -1501,7 +1501,7 @@ SymbolAssignment *ScriptParser::readAssi
// The RHS may be something like "ABSOLUTE(.) & 0xff".
// Call readExpr1 to read the whole expression.
E = readExpr1(readParenExpr(), 0);
- E.IsAbsolute = []() { return true; };
+ E.IsAbsolute = [] { return true; };
} else {
E = readExpr();
}
@@ -1529,8 +1529,8 @@ static Expr combine(StringRef Op, Expr L
}
if (Op == "+")
return {[=](uint64_t Dot) { return L(Dot) + R(Dot); },
- [=]() { return L.IsAbsolute() && R.IsAbsolute(); },
- [=]() {
+ [=] { return L.IsAbsolute() && R.IsAbsolute(); },
+ [=] {
const OutputSectionBase *S = L.Section();
return S ? S : R.Section();
}};
@@ -1678,8 +1678,8 @@ Expr ScriptParser::readPrimary() {
StringRef Name = readParenLiteral();
return {
[=](uint64_t Dot) { return ScriptBase->getOutputSection(Name)->Addr; },
- [=]() { return false; },
- [=]() { return ScriptBase->getOutputSection(Name); }};
+ [=] { return false; },
+ [=] { return ScriptBase->getOutputSection(Name); }};
}
if (Tok == "LOADADDR") {
StringRef Name = readParenLiteral();
@@ -1756,8 +1756,8 @@ Expr ScriptParser::readPrimary() {
if (Tok != "." && !isValidCIdentifier(Tok))
setError("malformed number: " + Tok);
return {[=](uint64_t Dot) { return getSymbolValue(Tok, Dot); },
- [=]() { return isAbsolute(Tok); },
- [=]() { return ScriptBase->getSymbolSection(Tok); }};
+ [=] { return isAbsolute(Tok); },
+ [=] { return ScriptBase->getSymbolSection(Tok); }};
}
Expr ScriptParser::readTernary(Expr Cond) {
Modified: lld/trunk/ELF/LinkerScript.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.h?rev=287324&r1=287323&r2=287324&view=diff
==============================================================================
--- lld/trunk/ELF/LinkerScript.h (original)
+++ lld/trunk/ELF/LinkerScript.h Fri Nov 18 00:49:09 2016
@@ -55,7 +55,7 @@ struct Expr {
std::function<const OutputSectionBase *()> Section)
: Val(Val), IsAbsolute(IsAbsolute), Section(Section) {}
template <typename T>
- Expr(T V) : Expr(V, []() { return true; }, []() { return nullptr; }) {}
+ Expr(T V) : Expr(V, [] { return true; }, [] { return nullptr; }) {}
Expr() : Expr(nullptr) {}
};
More information about the llvm-commits
mailing list