diff options
Diffstat (limited to 'llvm/include')
-rw-r--r-- | llvm/include/llvm/MC/MCSection.h | 18 | ||||
-rw-r--r-- | llvm/include/llvm/Target/TargetAsmInfo.h | 8 | ||||
-rw-r--r-- | llvm/include/llvm/Target/TargetLoweringObjectFile.h | 24 |
3 files changed, 16 insertions, 34 deletions
diff --git a/llvm/include/llvm/MC/MCSection.h b/llvm/include/llvm/MC/MCSection.h index 0669d0f39b1..4e5969ab3e5 100644 --- a/llvm/include/llvm/MC/MCSection.h +++ b/llvm/include/llvm/MC/MCSection.h @@ -20,6 +20,8 @@ namespace llvm { class MCContext; + class TargetAsmInfo; + class raw_ostream; /// MCSection - Instances of this class represent a uniqued identifier for a /// section in the current translation unit. The MCContext class uniques and @@ -43,13 +45,13 @@ namespace llvm { public: virtual ~MCSection(); - static MCSection *Create(const StringRef &Name, bool IsDirective, - SectionKind K, MCContext &Ctx); - const std::string &getName() const { return Name; } bool isDirective() const { return IsDirective; } SectionKind getKind() const { return Kind; } + + virtual void PrintSwitchToSection(const TargetAsmInfo &TAI, + raw_ostream &OS) const = 0; }; @@ -60,7 +62,9 @@ namespace llvm { static MCSectionELF *Create(const StringRef &Name, bool IsDirective, SectionKind K, MCContext &Ctx); - + + virtual void PrintSwitchToSection(const TargetAsmInfo &TAI, + raw_ostream &OS) const; }; class MCSectionMachO : public MCSection { @@ -70,6 +74,9 @@ namespace llvm { static MCSectionMachO *Create(const StringRef &Name, bool IsDirective, SectionKind K, MCContext &Ctx); + + virtual void PrintSwitchToSection(const TargetAsmInfo &TAI, + raw_ostream &OS) const; }; class MCSectionCOFF : public MCSection { @@ -79,6 +86,9 @@ namespace llvm { static MCSectionCOFF *Create(const StringRef &Name, bool IsDirective, SectionKind K, MCContext &Ctx); + + virtual void PrintSwitchToSection(const TargetAsmInfo &TAI, + raw_ostream &OS) const; }; } // end namespace llvm diff --git a/llvm/include/llvm/Target/TargetAsmInfo.h b/llvm/include/llvm/Target/TargetAsmInfo.h index 92b977154bc..aa39c90c5a9 100644 --- a/llvm/include/llvm/Target/TargetAsmInfo.h +++ b/llvm/include/llvm/Target/TargetAsmInfo.h @@ -182,11 +182,6 @@ namespace llvm { //===--- Section Switching Directives ---------------------------------===// - /// SwitchToSectionDirective - This is the directive used when we want to - /// emit a global to an arbitrary section. The section name is emited after - /// this. - const char *SwitchToSectionDirective; // Defaults to "\t.section\t" - /// JumpTableDirective - if non-null, the directive to emit before a jump /// table. const char *JumpTableDirective; @@ -432,9 +427,6 @@ namespace llvm { unsigned getTextAlignFillValue() const { return TextAlignFillValue; } - const char *getSwitchToSectionDirective() const { - return SwitchToSectionDirective; - } const char *getGlobalDirective() const { return GlobalDirective; } diff --git a/llvm/include/llvm/Target/TargetLoweringObjectFile.h b/llvm/include/llvm/Target/TargetLoweringObjectFile.h index e517fd375a5..0b6fd30a312 100644 --- a/llvm/include/llvm/Target/TargetLoweringObjectFile.h +++ b/llvm/include/llvm/Target/TargetLoweringObjectFile.h @@ -169,14 +169,6 @@ public: return 0; } - /// getSectionFlagsAsString - Turn the flags in the specified SectionKind - /// into a string that can be printed to the assembly file after the - /// ".section foo" part of a section directive. - virtual void getSectionFlagsAsString(SectionKind Kind, - SmallVectorImpl<char> &Str, - const TargetAsmInfo &TAI) const { - } - protected: virtual const MCSection * SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, @@ -187,7 +179,6 @@ protected: class TargetLoweringObjectFileELF : public TargetLoweringObjectFile { - bool AtIsCommentChar; // True if @ is the comment character on this target. bool HasCrazyBSS; protected: /// TLSDataSection - Section directive for Thread Local data. @@ -212,12 +203,9 @@ protected: const MCSection *getELFSection(const char *Name, bool isDirective, SectionKind Kind) const; public: - /// ELF Constructor - AtIsCommentChar is true if the CommentCharacter from TAI - /// is "@". - TargetLoweringObjectFileELF(bool atIsCommentChar = false, - // FIXME: REMOVE AFTER UNIQUING IS FIXED. + TargetLoweringObjectFileELF(// FIXME: REMOVE AFTER UNIQUING IS FIXED. bool hasCrazyBSS = false) - : AtIsCommentChar(atIsCommentChar), HasCrazyBSS(hasCrazyBSS) {} + : HasCrazyBSS(hasCrazyBSS) {} virtual void Initialize(MCContext &Ctx, const TargetMachine &TM); @@ -230,10 +218,6 @@ public: getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind, Mangler *Mang, const TargetMachine &TM) const; - void getSectionFlagsAsString(SectionKind Kind, - SmallVectorImpl<char> &Str, - const TargetAsmInfo &TAI) const; - virtual const MCSection * SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, Mangler *Mang, const TargetMachine &TM) const; @@ -288,10 +272,6 @@ public: getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind, Mangler *Mang, const TargetMachine &TM) const; - virtual void getSectionFlagsAsString(SectionKind Kind, - SmallVectorImpl<char> &Str, - const TargetAsmInfo &TAI) const; - virtual const MCSection * SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, Mangler *Mang, const TargetMachine &TM) const; |