Doh. Must check if GV is constant first.

llvm-svn: 31252
This commit is contained in:
Evan Cheng 2006-10-28 05:56:06 +00:00
parent 1e075d9a40
commit 0d782b4c60
1 changed files with 2 additions and 2 deletions

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;
}