diff options
author | Chris Lattner <sabre@nondot.org> | 2009-07-26 06:26:55 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-07-26 06:26:55 +0000 |
commit | 5c2f789952ff315021afb10381f141f2ac3b1a6b (patch) | |
tree | 2ae0bbd9bc6de6fa917533c7992c7b7d69054f8f /lib/Target/ELFTargetAsmInfo.cpp | |
parent | f15327290e624472a7565ac5d022767a78912ab6 (diff) | |
download | external_llvm-5c2f789952ff315021afb10381f141f2ac3b1a6b.tar.gz external_llvm-5c2f789952ff315021afb10381f141f2ac3b1a6b.tar.bz2 external_llvm-5c2f789952ff315021afb10381f141f2ac3b1a6b.zip |
simplify getSectionForMergableConstant to take a SectionKind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77134 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ELFTargetAsmInfo.cpp')
-rw-r--r-- | lib/Target/ELFTargetAsmInfo.cpp | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/lib/Target/ELFTargetAsmInfo.cpp b/lib/Target/ELFTargetAsmInfo.cpp index 82c993b685..5d8d720cda 100644 --- a/lib/Target/ELFTargetAsmInfo.cpp +++ b/lib/Target/ELFTargetAsmInfo.cpp @@ -92,21 +92,8 @@ ELFTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV, /// specified size and relocation information, return a section that it /// should be placed in. const Section * -ELFTargetAsmInfo::getSectionForMergableConstant(uint64_t Size, - unsigned ReloInfo) const { - // If this constant pool entry has relocations, stick it into a relocatable - // section. - if (ReloInfo == 2) - return DataRelROSection; - if (ReloInfo == 1) - return DataRelROLocalSection; - - switch (Size) { - default: return ReadOnlySection; // .rodata - case 4: return MergableConst4Section; - case 8: return MergableConst8Section; - case 16: return MergableConst16Section; - } +ELFTargetAsmInfo::getSectionForMergableConstant(SectionKind Kind) const { + return SelectSectionForGlobal(0, Kind); } /// getFlagsForNamedSection - If this target wants to be able to infer |