diff options
Diffstat (limited to 'ELF/ScriptLexer.cpp')
| -rw-r--r-- | ELF/ScriptLexer.cpp | 9 | 
1 files changed, 9 insertions, 0 deletions
diff --git a/ELF/ScriptLexer.cpp b/ELF/ScriptLexer.cpp index d4b1f6d99cc1..9a372c6d1c6f 100644 --- a/ELF/ScriptLexer.cpp +++ b/ELF/ScriptLexer.cpp @@ -244,6 +244,15 @@ StringRef ScriptLexer::peek() {    return Tok;  } +StringRef ScriptLexer::peek2() { +  skip(); +  StringRef Tok = next(); +  if (errorCount()) +    return ""; +  Pos = Pos - 2; +  return Tok; +} +  bool ScriptLexer::consume(StringRef Tok) {    if (peek() == Tok) {      skip();  | 
