X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FMC%2FMCSection.h;h=8aec9c82e3281c19f264f13d3101d3cec967bc4c;hb=66981fe20809820e30dc19ea37ff7487eb67a96f;hp=5c997357c9d3818db320a29d5940760009a33b57;hpb=dd2ad8432f104282ff43c94457f474ea0a264175;p=oota-llvm.git diff --git a/include/llvm/MC/MCSection.h b/include/llvm/MC/MCSection.h index 5c997357c9d..8aec9c82e32 100644 --- a/include/llvm/MC/MCSection.h +++ b/include/llvm/MC/MCSection.h @@ -14,14 +14,13 @@ #ifndef LLVM_MC_MCSECTION_H #define LLVM_MC_MCSECTION_H -#include #include "llvm/ADT/StringRef.h" #include "llvm/MC/SectionKind.h" -#include "llvm/Support/Casting.h" +#include "llvm/Support/Compiler.h" namespace llvm { - class MCContext; class MCAsmInfo; + class MCExpr; class raw_ostream; /// MCSection - Instances of this class represent a uniqued identifier for a @@ -32,13 +31,12 @@ namespace llvm { enum SectionVariant { SV_COFF = 0, SV_ELF, - SV_MachO, - SV_PIC16 + SV_MachO }; private: - MCSection(const MCSection&); // DO NOT IMPLEMENT - void operator=(const MCSection&); // DO NOT IMPLEMENT + MCSection(const MCSection&) = delete; + void operator=(const MCSection&) = delete; protected: MCSection(SectionVariant V, SectionKind K) : Variant(V), Kind(K) {} SectionVariant Variant; @@ -51,7 +49,13 @@ namespace llvm { SectionVariant getVariant() const { return Variant; } virtual void PrintSwitchToSection(const MCAsmInfo &MAI, - raw_ostream &OS) const = 0; + raw_ostream &OS, + const MCExpr *Subsection) const = 0; + + // Convenience routines to get label names for the beginning/end of a + // section. + virtual std::string getLabelBeginName() const = 0; + virtual std::string getLabelEndName() const = 0; /// isBaseAddressKnownZero - Return true if we know that this section will /// get a base address of zero. In cases where we know that this is true we @@ -61,7 +65,13 @@ namespace llvm { return false; } - static bool classof(const MCSection *) { return true; } + // UseCodeAlign - Return true if a .align directive should use + // "optimized nops" to fill instead of 0s. + virtual bool UseCodeAlign() const = 0; + + /// isVirtualSection - Check whether this section is "virtual", that is + /// has no actual object file contents. + virtual bool isVirtualSection() const = 0; }; } // end namespace llvm