diff options
| author | Sean Callanan <scallanan@apple.com> | 2010-01-21 00:19:58 +0000 |
|---|---|---|
| committer | Sean Callanan <scallanan@apple.com> | 2010-01-21 00:19:58 +0000 |
| commit | 7a77eae2f3d4d2f0ff0ea4b817c24823f4a8b5c6 (patch) | |
| tree | 797075ea41bbe8b991b2f72a0e9597c96e76ae94 /llvm/tools/llvm-mc/AsmLexer.h | |
| parent | 879cc735fc6707aa5b6191158d8808d84fba3a8d (diff) | |
| download | bcm5719-llvm-7a77eae2f3d4d2f0ff0ea4b817c24823f4a8b5c6.tar.gz bcm5719-llvm-7a77eae2f3d4d2f0ff0ea4b817c24823f4a8b5c6.zip | |
Moved handling of inclusion from the AsmLexer to
the AsmParser, breaking AsmLexer's dependence on
SourceMgr.
llvm-svn: 94054
Diffstat (limited to 'llvm/tools/llvm-mc/AsmLexer.h')
| -rw-r--r-- | llvm/tools/llvm-mc/AsmLexer.h | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/llvm/tools/llvm-mc/AsmLexer.h b/llvm/tools/llvm-mc/AsmLexer.h index cc40d3516e9..1d49e4b766d 100644 --- a/llvm/tools/llvm-mc/AsmLexer.h +++ b/llvm/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,17 +43,16 @@ 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); const MCAsmInfo &getMAI() const { return MAI; } |

