First sketch of special section objects
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53320 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/X86/X86TargetAsmInfo.h b/lib/Target/X86/X86TargetAsmInfo.h
index bf68bf1..2fc2d65 100644
--- a/lib/Target/X86/X86TargetAsmInfo.h
+++ b/lib/Target/X86/X86TargetAsmInfo.h
@@ -34,16 +34,19 @@
};
struct X86DarwinTargetAsmInfo : public X86TargetAsmInfo {
+ const Section* TextCoalSection;
+ const Section* ConstDataCoalSection;
+ const Section* ConstDataSection;
+ const Section* DataCoalSection;
+
explicit X86DarwinTargetAsmInfo(const X86TargetMachine &TM);
virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
bool Global) const;
- virtual std::string SelectSectionForGlobal(const GlobalValue *GV) const;
- virtual unsigned SectionFlagsForGlobal(const GlobalValue *GV,
- const char* name) const;
+ virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const;
virtual std::string UniqueSectionForGlobal(const GlobalValue* GV,
SectionKind::Kind kind) const;
- std::string MergeableConstSection(const GlobalVariable *GV) const;
- std::string MergeableStringSection(const GlobalVariable *GV) const;
+ const Section* MergeableConstSection(const GlobalVariable *GV) const;
+ const Section* MergeableStringSection(const GlobalVariable *GV) const;
};
struct X86ELFTargetAsmInfo : public X86TargetAsmInfo {
@@ -51,20 +54,16 @@
virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
bool Global) const;
- virtual std::string SelectSectionForGlobal(const GlobalValue *GV) const;
- virtual unsigned SectionFlagsForGlobal(const GlobalValue *GV,
- const char* name) const;
+ virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const;
virtual std::string PrintSectionFlags(unsigned flags) const;
- std::string MergeableConstSection(const GlobalVariable *GV) const;
- std::string MergeableStringSection(const GlobalVariable *GV) const;
+ const Section* MergeableConstSection(const GlobalVariable *GV) const;
+ const Section* MergeableStringSection(const GlobalVariable *GV) const ;
};
struct X86COFFTargetAsmInfo : public X86TargetAsmInfo {
explicit X86COFFTargetAsmInfo(const X86TargetMachine &TM);
virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
bool Global) const;
- virtual unsigned SectionFlagsForGlobal(const GlobalValue *GV,
- const char* name) const;
virtual std::string UniqueSectionForGlobal(const GlobalValue* GV,
SectionKind::Kind kind) const;
virtual std::string PrintSectionFlags(unsigned flags) const;