mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-25 17:31:02 +00:00
Omit empty parameter list.
llvm-svn: 287324
This commit is contained in:
parent
46247b85be
commit
009d174229
@ -1501,7 +1501,7 @@ SymbolAssignment *ScriptParser::readAssignment(StringRef Name) {
|
|||||||
// The RHS may be something like "ABSOLUTE(.) & 0xff".
|
// The RHS may be something like "ABSOLUTE(.) & 0xff".
|
||||||
// Call readExpr1 to read the whole expression.
|
// Call readExpr1 to read the whole expression.
|
||||||
E = readExpr1(readParenExpr(), 0);
|
E = readExpr1(readParenExpr(), 0);
|
||||||
E.IsAbsolute = []() { return true; };
|
E.IsAbsolute = [] { return true; };
|
||||||
} else {
|
} else {
|
||||||
E = readExpr();
|
E = readExpr();
|
||||||
}
|
}
|
||||||
@ -1529,8 +1529,8 @@ static Expr combine(StringRef Op, Expr L, Expr R) {
|
|||||||
}
|
}
|
||||||
if (Op == "+")
|
if (Op == "+")
|
||||||
return {[=](uint64_t Dot) { return L(Dot) + R(Dot); },
|
return {[=](uint64_t Dot) { return L(Dot) + R(Dot); },
|
||||||
[=]() { return L.IsAbsolute() && R.IsAbsolute(); },
|
[=] { return L.IsAbsolute() && R.IsAbsolute(); },
|
||||||
[=]() {
|
[=] {
|
||||||
const OutputSectionBase *S = L.Section();
|
const OutputSectionBase *S = L.Section();
|
||||||
return S ? S : R.Section();
|
return S ? S : R.Section();
|
||||||
}};
|
}};
|
||||||
@ -1678,8 +1678,8 @@ Expr ScriptParser::readPrimary() {
|
|||||||
StringRef Name = readParenLiteral();
|
StringRef Name = readParenLiteral();
|
||||||
return {
|
return {
|
||||||
[=](uint64_t Dot) { return ScriptBase->getOutputSection(Name)->Addr; },
|
[=](uint64_t Dot) { return ScriptBase->getOutputSection(Name)->Addr; },
|
||||||
[=]() { return false; },
|
[=] { return false; },
|
||||||
[=]() { return ScriptBase->getOutputSection(Name); }};
|
[=] { return ScriptBase->getOutputSection(Name); }};
|
||||||
}
|
}
|
||||||
if (Tok == "LOADADDR") {
|
if (Tok == "LOADADDR") {
|
||||||
StringRef Name = readParenLiteral();
|
StringRef Name = readParenLiteral();
|
||||||
@ -1756,8 +1756,8 @@ Expr ScriptParser::readPrimary() {
|
|||||||
if (Tok != "." && !isValidCIdentifier(Tok))
|
if (Tok != "." && !isValidCIdentifier(Tok))
|
||||||
setError("malformed number: " + Tok);
|
setError("malformed number: " + Tok);
|
||||||
return {[=](uint64_t Dot) { return getSymbolValue(Tok, Dot); },
|
return {[=](uint64_t Dot) { return getSymbolValue(Tok, Dot); },
|
||||||
[=]() { return isAbsolute(Tok); },
|
[=] { return isAbsolute(Tok); },
|
||||||
[=]() { return ScriptBase->getSymbolSection(Tok); }};
|
[=] { return ScriptBase->getSymbolSection(Tok); }};
|
||||||
}
|
}
|
||||||
|
|
||||||
Expr ScriptParser::readTernary(Expr Cond) {
|
Expr ScriptParser::readTernary(Expr Cond) {
|
||||||
|
@ -55,7 +55,7 @@ struct Expr {
|
|||||||
std::function<const OutputSectionBase *()> Section)
|
std::function<const OutputSectionBase *()> Section)
|
||||||
: Val(Val), IsAbsolute(IsAbsolute), Section(Section) {}
|
: Val(Val), IsAbsolute(IsAbsolute), Section(Section) {}
|
||||||
template <typename T>
|
template <typename T>
|
||||||
Expr(T V) : Expr(V, []() { return true; }, []() { return nullptr; }) {}
|
Expr(T V) : Expr(V, [] { return true; }, [] { return nullptr; }) {}
|
||||||
Expr() : Expr(nullptr) {}
|
Expr() : Expr(nullptr) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user