Mark a few more expressions as absolute.

llvm-svn: 285611
This commit is contained in:
Rafael Espindola
2016-10-31 18:20:34 +00:00
parent f3cec65d01
commit a0aaa8a0a3
3 changed files with 42 additions and 7 deletions

View File

@@ -1623,7 +1623,7 @@ Expr ScriptParser::readPrimary() {
}
if (Tok == "CONSTANT") {
StringRef Name = readParenLiteral();
return [=](uint64_t Dot) { return getConstant(Name); };
return {[=](uint64_t Dot) { return getConstant(Name); }, true};
}
if (Tok == "DEFINED") {
expect("(");
@@ -1666,7 +1666,9 @@ Expr ScriptParser::readPrimary() {
}
if (Tok == "SIZEOF") {
StringRef Name = readParenLiteral();
return [=](uint64_t Dot) { return ScriptBase->getOutputSectionSize(Name); };
return {
[=](uint64_t Dot) { return ScriptBase->getOutputSectionSize(Name); },
true};
}
if (Tok == "ALIGNOF") {
StringRef Name = readParenLiteral();
@@ -1675,7 +1677,7 @@ Expr ScriptParser::readPrimary() {
true};
}
if (Tok == "SIZEOF_HEADERS")
return [=](uint64_t Dot) { return ScriptBase->getHeaderSize(); };
return {[=](uint64_t Dot) { return ScriptBase->getHeaderSize(); }, true};
// Tok is a literal number.
uint64_t V;