diff options
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.h')
-rw-r--r-- | llvm/lib/AsmParser/LLParser.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/llvm/lib/AsmParser/LLParser.h b/llvm/lib/AsmParser/LLParser.h index 1ea19793795..d6cb197e978 100644 --- a/llvm/lib/AsmParser/LLParser.h +++ b/llvm/lib/AsmParser/LLParser.h @@ -89,6 +89,11 @@ namespace llvm { // Helper Routines. bool ParseToken(lltok::Kind T, const char *ErrMsg); + bool EatIfPresent(lltok::Kind T) { + if (Lex.getKind() != T) return false; + Lex.Lex(); + return true; + } bool ParseOptionalToken(lltok::Kind T, bool &Present) { if (Lex.getKind() != T) { Present = false; @@ -98,10 +103,11 @@ namespace llvm { } return false; } - bool ParseUnsigned(unsigned &Val); - bool ParseUnsigned(unsigned &Val, LocTy &Loc) { + bool ParseStringConstant(std::string &Result); + bool ParseUInt32(unsigned &Val); + bool ParseUInt32(unsigned &Val, LocTy &Loc) { Loc = Lex.getLoc(); - return ParseUnsigned(Val); + return ParseUInt32(Val); } bool ParseOptionalAddrSpace(unsigned &AddrSpace); bool ParseOptionalAttrs(unsigned &Attrs, unsigned AttrKind); |