From: Daniel Dunbar Date: Thu, 10 Sep 2009 00:59:15 +0000 (+0000) Subject: MC: Give target specific parsers access to the MCStreamer. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b8b70521def36d0da103b8a103872f37b3b49aa2;p=oota-llvm.git MC: Give target specific parsers access to the MCStreamer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81416 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/MC/MCAsmParser.h b/include/llvm/MC/MCAsmParser.h index 8c1b7b88633..c1b5d133cde 100644 --- a/include/llvm/MC/MCAsmParser.h +++ b/include/llvm/MC/MCAsmParser.h @@ -16,6 +16,7 @@ namespace llvm { class MCAsmLexer; class MCContext; class MCExpr; +class MCStreamer; class MCValue; class SMLoc; class Twine; @@ -35,6 +36,9 @@ public: virtual MCContext &getContext() = 0; + /// getSteamer - Return the output streamer for the assembler. + virtual MCStreamer &getStreamer() = 0; + /// Warning - Emit a warning at the location \arg L, with the message \arg /// Msg. virtual void Warning(SMLoc L, const Twine &Msg) = 0; diff --git a/tools/llvm-mc/AsmParser.h b/tools/llvm-mc/AsmParser.h index 7f038c90ff0..919d959d08d 100644 --- a/tools/llvm-mc/AsmParser.h +++ b/tools/llvm-mc/AsmParser.h @@ -67,6 +67,8 @@ public: virtual MCContext &getContext() { return Ctx; } + virtual MCStreamer &getStreamer() { return Out; } + virtual void Warning(SMLoc L, const Twine &Meg); virtual bool Error(SMLoc L, const Twine &Msg);