aboutsummaryrefslogtreecommitdiff
path: root/tools/llvm-mc/AsmLexer.h
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2010-01-21 00:19:58 +0000
committerSean Callanan <scallanan@apple.com>2010-01-21 00:19:58 +0000
commitfd0b0288e2ee5ccf3f1d47090542710c67a77cf7 (patch)
treebc4826e2dfb787c6eef093ba692a2163936207a6 /tools/llvm-mc/AsmLexer.h
parent05273448533565cf14d70e10f88919ee51755bc8 (diff)
Moved handling of inclusion from the AsmLexer to
the AsmParser, breaking AsmLexer's dependence on SourceMgr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94054 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-mc/AsmLexer.h')
-rw-r--r--tools/llvm-mc/AsmLexer.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/tools/llvm-mc/AsmLexer.h b/tools/llvm-mc/AsmLexer.h
index cc40d3516e..1d49e4b766 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,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; }