diff options
Diffstat (limited to 'lib/AsmParser/LLParser.h')
-rw-r--r-- | lib/AsmParser/LLParser.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/AsmParser/LLParser.h b/lib/AsmParser/LLParser.h index 1baa7d8..93e7f77 100644 --- a/lib/AsmParser/LLParser.h +++ b/lib/AsmParser/LLParser.h @@ -162,10 +162,12 @@ namespace llvm { Lex.Lex(); return true; } - bool ParseOptionalToken(lltok::Kind T, bool &Present) { + bool ParseOptionalToken(lltok::Kind T, bool &Present, LocTy *Loc = 0) { if (Lex.getKind() != T) { Present = false; } else { + if (Loc) + *Loc = Lex.getLoc(); Lex.Lex(); Present = true; } |