[lld] r284407 - ELF: Implement skip() as (void)next()
Justin Bogner via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 17 11:40:35 PDT 2016
Author: bogner
Date: Mon Oct 17 13:40:35 2016
New Revision: 284407
URL: http://llvm.org/viewvc/llvm-project?rev=284407&view=rev
Log:
ELF: Implement skip() as (void)next()
Thanks to Rafael for pointing out the simplification.
Modified:
lld/trunk/ELF/ScriptParser.cpp
Modified: lld/trunk/ELF/ScriptParser.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/ScriptParser.cpp?rev=284407&r1=284406&r2=284407&view=diff
==============================================================================
--- lld/trunk/ELF/ScriptParser.cpp (original)
+++ lld/trunk/ELF/ScriptParser.cpp Mon Oct 17 13:40:35 2016
@@ -150,15 +150,7 @@ bool ScriptParserBase::consume(StringRef
return true;
}
-void ScriptParserBase::skip() {
- if (Error)
- return;
- if (atEOF()) {
- setError("unexpected EOF");
- return;
- }
- ++Pos;
-}
+void ScriptParserBase::skip() { (void)next(); }
void ScriptParserBase::expect(StringRef Expect) {
if (Error)
More information about the llvm-commits
mailing list