summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86AsmPrinter.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2008-01-23 00:58:14 +0000
committerDale Johannesen <dalej@apple.com>2008-01-23 00:58:14 +0000
commit7f1ff5fedd7aaa26eb2251bc65ed1c6f97be6b34 (patch)
treef9cec33894162c39d06a84a26942a075d774aa2f /llvm/lib/Target/X86/X86AsmPrinter.cpp
parent7fe0bb2b43090f80773f05501ee31087b6b262ef (diff)
downloadbcm5719-llvm-7f1ff5fedd7aaa26eb2251bc65ed1c6f97be6b34.tar.gz
bcm5719-llvm-7f1ff5fedd7aaa26eb2251bc65ed1c6f97be6b34.zip
Honor explicit section information on Darwin.
llvm-svn: 46267
Diffstat (limited to 'llvm/lib/Target/X86/X86AsmPrinter.cpp')
-rw-r--r--llvm/lib/Target/X86/X86AsmPrinter.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86AsmPrinter.cpp b/llvm/lib/Target/X86/X86AsmPrinter.cpp
index ef8cbea590d..0b8c31cc7f6 100644
--- a/llvm/lib/Target/X86/X86AsmPrinter.cpp
+++ b/llvm/lib/Target/X86/X86AsmPrinter.cpp
@@ -275,7 +275,10 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
assert(!Subtarget->isTargetDarwin());
SectionName += ",\"aw\",@progbits";
}
-
+ SwitchToDataSection(SectionName.c_str());
+ } else if (I->hasSection() && Subtarget->isTargetDarwin()) {
+ // Honor all section names on Darwin; ObjC uses this
+ std::string SectionName = ".section " + I->getSection();
SwitchToDataSection(SectionName.c_str());
} else {
if (C->isNullValue() && !NoZerosInBSS && TAI->getBSSSection())
OpenPOWER on IntegriCloud