diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2006-10-26 21:48:57 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2006-10-26 21:48:57 +0000 |
| commit | e1e06c2de8c18771ab564d2bdf0d86502e0ea662 (patch) | |
| tree | 54e1092e54e9dc8fd9bfca1729c44d479119fa25 /llvm/lib | |
| parent | e974da6bb71d06405472468a4257099205685c32 (diff) | |
| download | bcm5719-llvm-e1e06c2de8c18771ab564d2bdf0d86502e0ea662.tar.gz bcm5719-llvm-e1e06c2de8c18771ab564d2bdf0d86502e0ea662.zip | |
Place cstrings in .cstring section.
llvm-svn: 31207
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | 8 | ||||
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp index a7086975f05..bfea893a9b2 100644 --- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp @@ -548,6 +548,14 @@ bool DarwinAsmPrinter::doFinalization(Module &M) { O << "\t.globl " << name << "\n"; // FALL THROUGH case GlobalValue::InternalLinkage: + if (TAI->getCStringSection()) { + const ConstantArray *CVA = dyn_cast<ConstantArray>(C); + if (CVA && CVA->isCString()) { + SwitchToDataSection(TAI->getCStringSection(), I); + break; + } + } + SwitchToDataSection("\t.data", I); break; default: diff --git a/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp b/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp index cecffbabf1c..f8848f592c5 100644 --- a/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp +++ b/llvm/lib/Target/PowerPC/PPCTargetAsmInfo.cpp @@ -28,6 +28,7 @@ DarwinTargetAsmInfo::DarwinTargetAsmInfo(const PPCTargetMachine &TM) { AlignmentIsInBytes = false; ConstantPoolSection = "\t.const\t"; JumpTableDataSection = ".const"; + CStringSection = "\t.cstring"; LCOMMDirective = "\t.lcomm\t"; StaticCtorsSection = ".mod_init_func"; StaticDtorsSection = ".mod_term_func"; |

