X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FMC%2FMCNullStreamer.cpp;h=9b9c4aa2a0cdfc306839804ac2326416b235210a;hb=bb96dfcf4f58ae7152f4be92254a0bb1c0995e6d;hp=c872b2203f87b41a3cd34480ade9c4de7cf14c64;hpb=3de61b4c0144748e4b9157e2c22fe4ea685981a2;p=oota-llvm.git diff --git a/lib/MC/MCNullStreamer.cpp b/lib/MC/MCNullStreamer.cpp index c872b2203f8..9b9c4aa2a0c 100644 --- a/lib/MC/MCNullStreamer.cpp +++ b/lib/MC/MCNullStreamer.cpp @@ -19,7 +19,7 @@ namespace { class MCNullStreamer : public MCStreamer { public: - MCNullStreamer(MCContext &Context) : MCStreamer(SK_NullStreamer, Context) {} + MCNullStreamer(MCContext &Context) : MCStreamer(Context, 0) {} /// @name MCStreamer Interface /// @{ @@ -30,13 +30,14 @@ namespace { virtual void InitSections() { } - virtual void ChangeSection(const MCSection *Section) { + virtual void ChangeSection(const MCSection *Section, + const MCExpr *Subsection) { } virtual void EmitLabel(MCSymbol *Symbol) { assert(Symbol->isUndefined() && "Cannot define a symbol twice!"); - assert(getCurrentSection() && "Cannot emit before setting section!"); - Symbol->setSection(*getCurrentSection()); + assert(getCurrentSection().first &&"Cannot emit before setting section!"); + AssignSection(Symbol, getCurrentSection().first); } virtual void EmitDebugLabel(MCSymbol *Symbol) { EmitLabel(Symbol); @@ -51,7 +52,9 @@ namespace { const MCSymbol *Label, unsigned PointerSize) {} - virtual void EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute){} + virtual bool EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute){ + return true; + } virtual void EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) {} @@ -70,10 +73,9 @@ namespace { uint64_t Size = 0, unsigned ByteAlignment = 0) {} virtual void EmitTBSSSymbol(const MCSection *Section, MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) {} - virtual void EmitBytes(StringRef Data, unsigned AddrSpace) {} + virtual void EmitBytes(StringRef Data) {} - virtual void EmitValueImpl(const MCExpr *Value, unsigned Size, - unsigned AddrSpace) {} + virtual void EmitValueImpl(const MCExpr *Value, unsigned Size) {} virtual void EmitULEB128Value(const MCExpr *Value) {} virtual void EmitSLEB128Value(const MCExpr *Value) {} virtual void EmitGPRel32Value(const MCExpr *Value) {} @@ -107,13 +109,6 @@ namespace { virtual void EmitCFIEndProcImpl(MCDwarfFrameInfo &Frame) { RecordProcEnd(Frame); } - - /// @} - - static bool classof(const MCStreamer *S) { - return S->getKind() == SK_NullStreamer; - } - }; }