From e3f198d58ab3fef822e48649775aa5c753ac240b Mon Sep 17 00:00:00 2001 From: George Rimar Date: Mon, 12 Mar 2018 12:34:43 +0000 Subject: [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 --- lld/ELF/ScriptParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lld/ELF/ScriptParser.cpp') 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 &Dest = Script->InsertAfterCommands[next()]; Dest.insert(Dest.end(), V.begin(), V.end()); return; -- cgit v1.2.3