Doh. Must check if GV is constant first.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31252 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2006-10-28 05:56:06 +00:00
parent 7a2ed81f08
commit 71aae62445

View File

@ -205,9 +205,9 @@ bool X86SharedAsmPrinter::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;
}