diff options
Diffstat (limited to 'tools/llvm-mc/AsmLexer.h')
-rw-r--r-- | tools/llvm-mc/AsmLexer.h | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/tools/llvm-mc/AsmLexer.h b/tools/llvm-mc/AsmLexer.h index ce292f6..1d49e4b 100644 --- a/tools/llvm-mc/AsmLexer.h +++ b/tools/llvm-mc/AsmLexer.h @@ -23,23 +23,17 @@ namespace llvm { class MemoryBuffer; -class SourceMgr; class SMLoc; class MCAsmInfo; /// AsmLexer - Lexer class for assembly files. class AsmLexer : public MCAsmLexer { - SourceMgr &SrcMgr; const MCAsmInfo &MAI; const char *CurPtr; const MemoryBuffer *CurBuf; const char *TokStart; - - /// This is the current buffer index we're lexing from as managed by the - /// SourceMgr object. - int CurBuffer; void operator=(const AsmLexer&); // DO NOT IMPLEMENT AsmLexer(const AsmLexer&); // DO NOT IMPLEMENT @@ -49,20 +43,19 @@ protected: virtual AsmToken LexToken(); public: - AsmLexer(SourceMgr &SrcMgr, const MCAsmInfo &MAI); + AsmLexer(const MCAsmInfo &MAI); ~AsmLexer(); + void setBuffer(const MemoryBuffer *buf, const char *ptr = NULL); + SMLoc getLoc() const; StringRef LexUntilEndOfStatement(); bool isAtStartOfComment(char Char); - - /// EnterIncludeFile - Enter the specified file. This returns true on failure. - bool EnterIncludeFile(const std::string &Filename); - - void PrintMessage(SMLoc Loc, const std::string &Msg, const char *Type) const; + const MCAsmInfo &getMAI() const { return MAI; } + private: int getNextChar(); AsmToken ReturnError(const char *Loc, const std::string &Msg); |