summaryrefslogtreecommitdiff
path: root/lib/MC/MCStreamer.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2013-01-31 23:29:57 +0000
committerChandler Carruth <chandlerc@gmail.com>2013-01-31 23:29:57 +0000
commit5da3665cc501ed8928e63678254357214ec0b9eb (patch)
tree69df5614946e3710e33f0501737b22a81dfa9957 /lib/MC/MCStreamer.cpp
parent169d5270751597aed4095ead00401a3374906147 (diff)
downloadllvm-5da3665cc501ed8928e63678254357214ec0b9eb.tar.gz
llvm-5da3665cc501ed8928e63678254357214ec0b9eb.tar.bz2
llvm-5da3665cc501ed8928e63678254357214ec0b9eb.tar.xz
Give the MCStreamer class hierarchy LLVM RTTI facilities for use with
isa<> and dyn_cast<>. In several places, code is already hacking around the absence of this, and there seem to be several interfaces that might be lifted and/or devirtualized using this. This change was based on a discussion with Jim Grosbach about how best to handle testing for specific MCStreamer subclasses. He said that this was the correct end state, and everything else was too hacky so I decided to just make it so. No functionality should be changed here, this is just threading the kind through all the constructors and setting up the classof overloads. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174113 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCStreamer.cpp')
-rw-r--r--lib/MC/MCStreamer.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/MC/MCStreamer.cpp b/lib/MC/MCStreamer.cpp
index 00ebde3c40..e92569b0cc 100644
--- a/lib/MC/MCStreamer.cpp
+++ b/lib/MC/MCStreamer.cpp
@@ -21,10 +21,9 @@
#include <cstdlib>
using namespace llvm;
-MCStreamer::MCStreamer(MCContext &Ctx)
- : Context(Ctx), EmitEHFrame(true), EmitDebugFrame(false),
- CurrentW64UnwindInfo(0), LastSymbol(0),
- AutoInitSections(false) {
+MCStreamer::MCStreamer(StreamerKind Kind, MCContext &Ctx)
+ : Kind(Kind), Context(Ctx), EmitEHFrame(true), EmitDebugFrame(false),
+ CurrentW64UnwindInfo(0), LastSymbol(0), AutoInitSections(false) {
const MCSection *section = NULL;
SectionStack.push_back(std::make_pair(section, section));
}