diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-09-10 00:59:15 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-09-10 00:59:15 +0000 |
commit | b8b70521def36d0da103b8a103872f37b3b49aa2 (patch) | |
tree | 1842156dca854a94a3265e957b9ac0315c2fd516 | |
parent | 2a16e6b22c558f9ba0b25096dfe0697488e51c8e (diff) |
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
-rw-r--r-- | include/llvm/MC/MCAsmParser.h | 4 | ||||
-rw-r--r-- | tools/llvm-mc/AsmParser.h | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/MC/MCAsmParser.h b/include/llvm/MC/MCAsmParser.h index 8c1b7b8863..c1b5d133cd 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 7f038c90ff..919d959d08 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); |