X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=tools%2Fllvm-mc%2FAsmLexer.h;h=ce292f66b127be5b2b051c2a10a743acb3499d60;hb=9e6d1d1f5034347d237941f1bf08fba5c1583cd3;hp=4200137f640afb1e59227aab5f2b4ddc7dfb9e98;hpb=cbbe2484418536264b1a26c517c16d505a61d5c8;p=oota-llvm.git diff --git a/tools/llvm-mc/AsmLexer.h b/tools/llvm-mc/AsmLexer.h index 4200137f640..ce292f66b12 100644 --- a/tools/llvm-mc/AsmLexer.h +++ b/tools/llvm-mc/AsmLexer.h @@ -16,7 +16,8 @@ #include "llvm/ADT/StringRef.h" #include "llvm/MC/MCAsmLexer.h" -#include "llvm/Support/DataTypes.h" +#include "llvm/MC/MCAsmInfo.h" +#include "llvm/System/DataTypes.h" #include #include @@ -24,10 +25,12 @@ 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; @@ -46,10 +49,14 @@ protected: virtual AsmToken LexToken(); public: - AsmLexer(SourceMgr &SrcMgr); + AsmLexer(SourceMgr &SrcMgr, const MCAsmInfo &MAI); ~AsmLexer(); 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); @@ -61,7 +68,6 @@ private: AsmToken ReturnError(const char *Loc, const std::string &Msg); AsmToken LexIdentifier(); - AsmToken LexPercent(); AsmToken LexSlash(); AsmToken LexLineComment(); AsmToken LexDigit();