MCAsmParser: Add getSourceManager().
authorDaniel Dunbar <daniel@zuster.org>
Mon, 12 Jul 2010 18:35:04 +0000 (18:35 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Mon, 12 Jul 2010 18:35:04 +0000 (18:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108171 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/MC/MCParser/AsmParser.h
include/llvm/MC/MCParser/MCAsmParser.h
include/llvm/MC/MCParser/MCAsmParserExtension.h

index 348351180a5249863df2fc7cfda618c60cedcf73..ce7cee95e964a66dfbf9695125a20d68681abd09 100644 (file)
@@ -80,6 +80,7 @@ public:
   /// @name MCAsmParser Interface
   /// {
 
+  virtual SourceMgr &getSourceManager() { return SrcMgr; }
   virtual MCAsmLexer &getLexer() { return Lexer; }
   virtual MCContext &getContext() { return Ctx; }
   virtual MCStreamer &getStreamer() { return Out; }
index d78f512a4adc7fdc67c3633004d0c0f4b6bb730f..da9b6f228d93a7b572cfb7691558f30cff7abc8d 100644 (file)
@@ -20,6 +20,7 @@ class MCContext;
 class MCExpr;
 class MCStreamer;
 class SMLoc;
+class SourceMgr;
 class StringRef;
 class Twine;
 
@@ -42,6 +43,8 @@ public:
                                    StringRef Directive,
                                    DirectiveHandler Handler) = 0;
 
+  virtual SourceMgr &getSourceManager() = 0;
+
   virtual MCAsmLexer &getLexer() = 0;
 
   virtual MCContext &getContext() = 0;
index 8938cf3ef7a744623ce48321e4a1ccc97a3196f5..ad9ccf79d12a10464d6a8f897c987f3c51ef3ad8 100644 (file)
@@ -41,6 +41,7 @@ public:
   MCContext &getContext() { return getParser().getContext(); }
   MCAsmLexer &getLexer() { return getParser().getLexer(); }
   MCAsmParser &getParser() { return *Parser; }
+  SourceMgr &getSourceManager() { return getParser().getSourceManager(); }
   MCStreamer &getStreamer() { return getParser().getStreamer(); }
   void Warning(SMLoc L, const Twine &Msg) {
     return getParser().Warning(L, Msg);