summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2016-11-18 06:49:09 +0000
committerRui Ueyama <ruiu@google.com>2016-11-18 06:49:09 +0000
commit009d1742297c75be13426cfd8703a9aebca70494 (patch)
treede42c942b58e6ebe30774aaa77f6031f37a47588
parent46247b85be9f306e8976f6d01388ca8a4682dd4c (diff)
downloadbcm5719-llvm-009d1742297c75be13426cfd8703a9aebca70494.tar.gz
bcm5719-llvm-009d1742297c75be13426cfd8703a9aebca70494.zip
Omit empty parameter list.
llvm-svn: 287324
-rw-r--r--lld/ELF/LinkerScript.cpp14
-rw-r--r--lld/ELF/LinkerScript.h2
2 files changed, 8 insertions, 8 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index bbce29fd5bc..9500d01bf36 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -1501,7 +1501,7 @@ SymbolAssignment *ScriptParser::readAssignment(StringRef Name) {
// 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, Expr R) {
}
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) {
diff --git a/lld/ELF/LinkerScript.h b/lld/ELF/LinkerScript.h
index e67935529f2..a311f5d2771 100644
--- a/lld/ELF/LinkerScript.h
+++ b/lld/ELF/LinkerScript.h
@@ -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) {}
};
OpenPOWER on IntegriCloud