summaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86TargetAsmInfo.cpp
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2008-07-09 21:54:26 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2008-07-09 21:54:26 +0000
commit7705ea33e4898c6d7718f0a2dab22d6659498fc4 (patch)
tree285cda0759603c0d4c9b3e73a3bccc467e452d53 /lib/Target/X86/X86TargetAsmInfo.cpp
parentd41141942239c10c9979106e82ab45f22ad7c16c (diff)
downloadllvm-7705ea33e4898c6d7718f0a2dab22d6659498fc4.tar.gz
llvm-7705ea33e4898c6d7718f0a2dab22d6659498fc4.tar.bz2
llvm-7705ea33e4898c6d7718f0a2dab22d6659498fc4.tar.xz
Remove a FIXME: we really need to use const_data section on darwin for
constant pool, if relocation model is not static. This directly maps to the way how GCC works. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53370 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86TargetAsmInfo.cpp')
-rw-r--r--lib/Target/X86/X86TargetAsmInfo.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Target/X86/X86TargetAsmInfo.cpp b/lib/Target/X86/X86TargetAsmInfo.cpp
index 87024a8c17..d743860755 100644
--- a/lib/Target/X86/X86TargetAsmInfo.cpp
+++ b/lib/Target/X86/X86TargetAsmInfo.cpp
@@ -139,9 +139,10 @@ X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const X86TargetMachine &TM):
PrivateGlobalPrefix = "L"; // Marker for constant pool idxs
BSSSection = 0; // no BSS section.
ZeroFillDirective = "\t.zerofill\t"; // Uses .zerofill
- // FIXME: It seems, this should be .const_data if relocation model is not
- // static.
- ConstantPoolSection = "\t.const\n";
+ if (X86TM->getRelocationModel() != Reloc::Static)
+ ConstantPoolSection = "\t.const_data";
+ else
+ ConstantPoolSection = "\t.const\n";
JumpTableDataSection = "\t.const\n";
CStringSection = "\t.cstring";
CStringSection_ = getUnnamedSection("\t.cstring",