aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-10-28 05:56:51 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-10-28 05:56:51 +0000
commit31b6ddad31689b996c94dcde5f32fb2585df4af6 (patch)
tree0695c13490238639fb208915cf82eaa59fdc67e3 /lib
parent71aae624456cd6ffcfbb965ea56454f57644b538 (diff)
Doh. Must check if GV is constant first before putting it in .cstring.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31253 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/PowerPC/PPCAsmPrinter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp
index bfea893a9b..21c2f740af 100644
--- a/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ b/lib/Target/PowerPC/PPCAsmPrinter.cpp
@@ -548,9 +548,9 @@ bool DarwinAsmPrinter::doFinalization(Module &M) {
O << "\t.globl " << name << "\n";
// FALL THROUGH
case GlobalValue::InternalLinkage:
- if (TAI->getCStringSection()) {
+ if (I->isConstant()) {
const ConstantArray *CVA = dyn_cast<ConstantArray>(C);
- if (CVA && CVA->isCString()) {
+ if (TAI->getCStringSection() && CVA && CVA->isCString()) {
SwitchToDataSection(TAI->getCStringSection(), I);
break;
}