[llvm-commits] CVS: llvm/lib/Target/X86/X86AsmPrinter.cpp

Evan Cheng evan.cheng at apple.com
Fri Oct 27 22:56:20 PDT 2006



Changes in directory llvm/lib/Target/X86:

X86AsmPrinter.cpp updated: 1.206 -> 1.207
---
Log message:

Doh. Must check if GV is constant first.

---
Diffs of the changes:  (+2 -2)

 X86AsmPrinter.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/lib/Target/X86/X86AsmPrinter.cpp
diff -u llvm/lib/Target/X86/X86AsmPrinter.cpp:1.206 llvm/lib/Target/X86/X86AsmPrinter.cpp:1.207
--- llvm/lib/Target/X86/X86AsmPrinter.cpp:1.206	Thu Oct 26 14:18:18 2006
+++ llvm/lib/Target/X86/X86AsmPrinter.cpp	Sat Oct 28 00:56:06 2006
@@ -205,9 +205,9 @@
         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;
           }






More information about the llvm-commits mailing list