LLLexer.h (223017) | LLLexer.h (224145) |
---|---|
1//===- LLLexer.h - Lexer for LLVM Assembly Files ----------------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 24 unchanged lines hidden (view full) --- 33 SourceMgr &SM; 34 LLVMContext &Context; 35 36 // Information about the current token. 37 const char *TokStart; 38 lltok::Kind CurKind; 39 std::string StrVal; 40 unsigned UIntVal; | 1//===- LLLexer.h - Lexer for LLVM Assembly Files ----------------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 24 unchanged lines hidden (view full) --- 33 SourceMgr &SM; 34 LLVMContext &Context; 35 36 // Information about the current token. 37 const char *TokStart; 38 lltok::Kind CurKind; 39 std::string StrVal; 40 unsigned UIntVal; |
41 const Type *TyVal; | 41 Type *TyVal; |
42 APFloat APFloatVal; 43 APSInt APSIntVal; 44 45 std::string TheError; 46 public: 47 explicit LLLexer(MemoryBuffer *StartBuf, SourceMgr &SM, SMDiagnostic &, 48 LLVMContext &C); 49 ~LLLexer() {} 50 51 lltok::Kind Lex() { 52 return CurKind = LexToken(); 53 } 54 55 typedef SMLoc LocTy; 56 LocTy getLoc() const { return SMLoc::getFromPointer(TokStart); } 57 lltok::Kind getKind() const { return CurKind; } 58 const std::string &getStrVal() const { return StrVal; } | 42 APFloat APFloatVal; 43 APSInt APSIntVal; 44 45 std::string TheError; 46 public: 47 explicit LLLexer(MemoryBuffer *StartBuf, SourceMgr &SM, SMDiagnostic &, 48 LLVMContext &C); 49 ~LLLexer() {} 50 51 lltok::Kind Lex() { 52 return CurKind = LexToken(); 53 } 54 55 typedef SMLoc LocTy; 56 LocTy getLoc() const { return SMLoc::getFromPointer(TokStart); } 57 lltok::Kind getKind() const { return CurKind; } 58 const std::string &getStrVal() const { return StrVal; } |
59 const Type *getTyVal() const { return TyVal; } | 59 Type *getTyVal() const { return TyVal; } |
60 unsigned getUIntVal() const { return UIntVal; } 61 const APSInt &getAPSIntVal() const { return APSIntVal; } 62 const APFloat &getAPFloatVal() const { return APFloatVal; } 63 64 65 bool Error(LocTy L, const Twine &Msg) const; 66 bool Error(const Twine &Msg) const { return Error(getLoc(), Msg); } 67 std::string getFilename() const; --- 26 unchanged lines hidden --- | 60 unsigned getUIntVal() const { return UIntVal; } 61 const APSInt &getAPSIntVal() const { return APSIntVal; } 62 const APFloat &getAPFloatVal() const { return APFloatVal; } 63 64 65 bool Error(LocTy L, const Twine &Msg) const; 66 bool Error(const Twine &Msg) const { return Error(getLoc(), Msg); } 67 std::string getFilename() const; --- 26 unchanged lines hidden --- |