summaryrefslogtreecommitdiffstats
path: root/lld/ELF/ScriptParser.cpp
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2018-03-12 12:34:43 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2018-03-12 12:34:43 +0000
commite3f198d58ab3fef822e48649775aa5c753ac240b (patch)
treeae501f1c3e42df350936e4b4b1bbb3c2285d5155 /lld/ELF/ScriptParser.cpp
parent6618e2a09c69a305bcaf05e9d7a8a1dd32d514a8 (diff)
downloadbcm5719-llvm-e3f198d58ab3fef822e48649775aa5c753ac240b.tar.gz
bcm5719-llvm-e3f198d58ab3fef822e48649775aa5c753ac240b.zip
[ELF] - Change consume()->expect() in INSERT AFTER parsing.
AFTER keyword is mandatory and consume() was used by mistake here. We accepted broken script before this patch, testcase shows the issue. llvm-svn: 327260
Diffstat (limited to 'lld/ELF/ScriptParser.cpp')
-rw-r--r--lld/ELF/ScriptParser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/ELF/ScriptParser.cpp b/lld/ELF/ScriptParser.cpp
index 29dec116ce8..e23a70dffd0 100644
--- a/lld/ELF/ScriptParser.cpp
+++ b/lld/ELF/ScriptParser.cpp
@@ -450,7 +450,7 @@ void ScriptParser::readSections() {
}
if (!atEOF() && consume("INSERT")) {
- consume("AFTER");
+ expect("AFTER");
std::vector<BaseCommand *> &Dest = Script->InsertAfterCommands[next()];
Dest.insert(Dest.end(), V.begin(), V.end());
return;
OpenPOWER on IntegriCloud