summaryrefslogtreecommitdiff
path: root/lib/AsmParser/LLParser.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AsmParser/LLParser.h')
-rw-r--r--lib/AsmParser/LLParser.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/AsmParser/LLParser.h b/lib/AsmParser/LLParser.h
index 1baa7d8b99..93e7f778eb 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;
}