summaryrefslogtreecommitdiffstats
path: root/lld/ELF/ScriptParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/ScriptParser.cpp')
-rw-r--r--lld/ELF/ScriptParser.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/lld/ELF/ScriptParser.cpp b/lld/ELF/ScriptParser.cpp
index 0ba00a2ae35..155b08a26ac 100644
--- a/lld/ELF/ScriptParser.cpp
+++ b/lld/ELF/ScriptParser.cpp
@@ -1102,12 +1102,7 @@ uint64_t ScriptParser::readMemoryAssignment(StringRef S1, StringRef S2,
return 0;
}
expect("=");
-
- // TODO: Fully support constant expressions.
- if (Optional<uint64_t> Val = parseInt(next()))
- return *Val;
- setError("nonconstant expression for " + S1);
- return 0;
+ return readExpr()().getValue();
}
// Parse the MEMORY command as specified in:
OpenPOWER on IntegriCloud