summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-18 06:15:16 +0000
committerChris Lattner <sabre@nondot.org>2009-08-18 06:15:16 +0000
commit0adae25ec1af9a51eb864a13055dd2f70043cdb0 (patch)
tree40b2c61ed9050a7bfecdb583029721902dec1b72 /llvm/lib/MC
parent5de2e2de9308e2bcbea85a24d877bb9eb145356e (diff)
downloadbcm5719-llvm-0adae25ec1af9a51eb864a13055dd2f70043cdb0.tar.gz
bcm5719-llvm-0adae25ec1af9a51eb864a13055dd2f70043cdb0.zip
Make AsmStreamer maintain a notion of the current section, pushing it up from the
MCAsmStreamer. Based on this, eliminate the current section from AsmPrinter. While I'm at it, clean up the last of the horrible "switch to null section" stuff and add an assert. This change is in preparation for completely eliminating asmprinter::switchtosection. llvm-svn: 79324
Diffstat (limited to 'llvm/lib/MC')
-rw-r--r--llvm/lib/MC/MCAsmStreamer.cpp4
-rw-r--r--llvm/lib/MC/MCStreamer.cpp2
2 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/MC/MCAsmStreamer.cpp b/llvm/lib/MC/MCAsmStreamer.cpp
index 60d66f93af9..cb3642532c1 100644
--- a/llvm/lib/MC/MCAsmStreamer.cpp
+++ b/llvm/lib/MC/MCAsmStreamer.cpp
@@ -24,12 +24,10 @@ class MCAsmStreamer : public MCStreamer {
raw_ostream &OS;
const TargetAsmInfo &TAI;
AsmPrinter *Printer;
- const MCSection *CurSection;
public:
MCAsmStreamer(MCContext &Context, raw_ostream &_OS, const TargetAsmInfo &tai,
AsmPrinter *_AsmPrinter)
- : MCStreamer(Context), OS(_OS), TAI(tai), Printer(_AsmPrinter),
- CurSection(0) {}
+ : MCStreamer(Context), OS(_OS), TAI(tai), Printer(_AsmPrinter) {}
~MCAsmStreamer() {}
/// @name MCStreamer Interface
diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp
index a634f33ad34..8a6dcdae7a4 100644
--- a/llvm/lib/MC/MCStreamer.cpp
+++ b/llvm/lib/MC/MCStreamer.cpp
@@ -11,7 +11,7 @@
using namespace llvm;
-MCStreamer::MCStreamer(MCContext &_Context) : Context(_Context) {
+MCStreamer::MCStreamer(MCContext &_Context) : Context(_Context), CurSection(0) {
}
MCStreamer::~MCStreamer() {
OpenPOWER on IntegriCloud