diff options
author | Chris Lattner <sabre@nondot.org> | 2009-08-01 23:46:12 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-08-01 23:46:12 +0000 |
commit | 83d77faf6e8fc2c1c2377d037283dc162d8667a1 (patch) | |
tree | cd4f74cf10362426bfb894be3eb9b94b3d8c3fde /include/llvm/Target/TargetLoweringObjectFile.h | |
parent | 0da3f4f742bd70e4f12d2f16f766f978417683f1 (diff) |
Remove "JumpTableDataSection" from TAI, instead, have AsmPrinter
compute it based on what it knows. As part of this, rename getSectionForMergeableConstant
to getSectionForConstant because it works for non-mergable constants also.
The only functionality change from this is that Xcore will start dropping
its jump tables into readonly section instead of data section in -static mode.
This should be fine as the linker resolves the relocations. If this is a
problem, let me know and we'll come up with another solution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77833 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetLoweringObjectFile.h')
-rw-r--r-- | include/llvm/Target/TargetLoweringObjectFile.h | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/include/llvm/Target/TargetLoweringObjectFile.h b/include/llvm/Target/TargetLoweringObjectFile.h index 55d9cd297b..f6b1220e6c 100644 --- a/include/llvm/Target/TargetLoweringObjectFile.h +++ b/include/llvm/Target/TargetLoweringObjectFile.h @@ -45,7 +45,9 @@ protected: const MCSection *BSSSection; /// ReadOnlySection - Section that is readonly and can contain arbitrary - /// initialized data. + /// initialized data. Targets are not required to have a readonly section. + /// If they don't, various bits of code will fall back to using the data + /// section for constants. const MCSection *ReadOnlySection; public: @@ -76,11 +78,9 @@ public: return GV != 0; } - /// getSectionForMergeableConstant - Given a mergeable constant with the - /// specified size and relocation information, return a section that it - /// should be placed in. - virtual const MCSection * - getSectionForMergeableConstant(SectionKind Kind) const; + /// getSectionForConstant - Given a constant with the SectionKind, return a + /// section that it should be placed in. + virtual const MCSection *getSectionForConstant(SectionKind Kind) const; /// getKindForNamedSection - If this target wants to be able to override /// section flags based on the name of the section specified for a global @@ -158,11 +158,9 @@ public: virtual void Initialize(MCContext &Ctx, const TargetMachine &TM); - /// getSectionForMergeableConstant - Given a mergeable constant with the - /// specified size and relocation information, return a section that it - /// should be placed in. - virtual const MCSection * - getSectionForMergeableConstant(SectionKind Kind) const; + /// getSectionForConstant - Given a constant with the SectionKind, return a + /// section that it should be placed in. + virtual const MCSection *getSectionForConstant(SectionKind Kind) const; virtual SectionKind getKindForNamedSection(const char *Section, SectionKind K) const; @@ -194,8 +192,7 @@ public: SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, Mangler *Mang, const TargetMachine &TM) const; - virtual const MCSection * - getSectionForMergeableConstant(SectionKind Kind) const; + virtual const MCSection *getSectionForConstant(SectionKind Kind) const; /// shouldEmitUsedDirectiveFor - This hook allows targets to selectively /// decide not to emit the UsedDirective for some symbols in llvm.used. |