X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=include%2Fllvm%2FMC%2FMCStreamer.h;h=ad6a4086e1119031873cba9aae48d4983b85bd7c;hp=47d798dd8bd0fee82f75b1d3b4fe72669bc043e5;hb=e99ebe7d0c48e23bbe0fd0e14487b39268eda646;hpb=5759c3a02902026a27a0d1bc24a5bad85f52bd71 diff --git a/include/llvm/MC/MCStreamer.h b/include/llvm/MC/MCStreamer.h index 47d798dd8bd..ad6a4086e11 100644 --- a/include/llvm/MC/MCStreamer.h +++ b/include/llvm/MC/MCStreamer.h @@ -76,6 +76,7 @@ public: // FIXME: declared here because it is used from // lib/CodeGen/AsmPrinter/ARMException.cpp. class ARMTargetStreamer : public MCTargetStreamer { + virtual void anchor(); public: virtual void emitFnStart() = 0; virtual void emitFnEnd() = 0; @@ -87,6 +88,16 @@ public: virtual void emitPad(int64_t Offset) = 0; virtual void emitRegSave(const SmallVectorImpl &RegList, bool isVector) = 0; + + virtual void switchVendor(StringRef Vendor) = 0; + virtual void emitAttribute(unsigned Attribute, unsigned Value) = 0; + virtual void emitTextAttribute(unsigned Attribute, StringRef String) = 0; + virtual void emitIntTextAttribute(unsigned Attribute, unsigned IntValue, + StringRef StringValue = "") = 0; + virtual void emitFPU(unsigned FPU) = 0; + virtual void emitArch(unsigned Arch) = 0; + virtual void finishAttributeSection() = 0; + virtual void emitInst(uint32_t Inst, char Suffix = '\0') = 0; }; /// MCStreamer - Streaming machine code generation interface. This interface @@ -160,9 +171,8 @@ public: MCContext &getContext() const { return Context; } - MCTargetStreamer &getTargetStreamer() { - assert(TargetStreamer); - return *TargetStreamer; + MCTargetStreamer *getTargetStreamer() { + return TargetStreamer.get(); } unsigned getNumFrameInfos() { return FrameInfos.size(); } @@ -327,6 +337,8 @@ public: /// @param Symbol - The symbol to emit. A given symbol should only be /// emitted as a label once, and symbols emitted as a label should never be /// used in an assignment. + // FIXME: These emission are non-const because we mutate the symbol to + // add the section we're emitting it to later. virtual void EmitLabel(MCSymbol *Symbol); virtual void EmitDebugLabel(MCSymbol *Symbol); @@ -400,9 +412,14 @@ public: /// EndCOFFSymbolDef - Marks the end of the symbol definition. virtual void EndCOFFSymbolDef() = 0; + /// EmitCOFFSectionIndex - Emits a COFF section index. + /// + /// @param Symbol - Symbol the section number relocation should point to. + virtual void EmitCOFFSectionIndex(MCSymbol const *Symbol); + /// EmitCOFFSecRel32 - Emits a COFF section relative relocation. /// - /// @param Symbol - Symbol the section relative realocation should point to. + /// @param Symbol - Symbol the section relative relocation should point to. virtual void EmitCOFFSecRel32(MCSymbol const *Symbol); /// EmitELFSize - Emit an ELF .size directive.