diff options
| author | George Rimar <grimar@accesssoftek.com> | 2018-03-12 12:34:43 +0000 |
|---|---|---|
| committer | George Rimar <grimar@accesssoftek.com> | 2018-03-12 12:34:43 +0000 |
| commit | e3f198d58ab3fef822e48649775aa5c753ac240b (patch) | |
| tree | ae501f1c3e42df350936e4b4b1bbb3c2285d5155 /lld/ELF/ScriptParser.cpp | |
| parent | 6618e2a09c69a305bcaf05e9d7a8a1dd32d514a8 (diff) | |
| download | bcm5719-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.cpp | 2 |
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; |

