[llvm-commits] CVS: llvm/lib/VMCore/ConstantFolding.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu Jan 6 08:26:54 PST 2005



Changes in directory llvm/lib/VMCore:

ConstantFolding.cpp updated: 1.69 -> 1.70
---
Log message:

No need to pessimize current code for future possibilities.


---
Diffs of the changes:  (+3 -4)

Index: llvm/lib/VMCore/ConstantFolding.cpp
diff -u llvm/lib/VMCore/ConstantFolding.cpp:1.69 llvm/lib/VMCore/ConstantFolding.cpp:1.70
--- llvm/lib/VMCore/ConstantFolding.cpp:1.69	Mon Nov 22 13:15:27 2004
+++ llvm/lib/VMCore/ConstantFolding.cpp	Thu Jan  6 10:26:38 2005
@@ -529,10 +529,9 @@
   if (const GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
     if (DestTy == Type::BoolTy)
       // FIXME: When we support 'external weak' references, we have to prevent
-      // this transformation from happening.  In the meantime we avoid folding
-      // any cast of an external symbol.
-      if (!GV->isExternal())
-        return ConstantBool::True;
+      // this transformation from happening.  This code will need to be updated
+      // to ignore external weak symbols when we support it.
+      return ConstantBool::True;
   } else if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) {
     if (CE->getOpcode() == Instruction::Cast) {
       Constant *Op = const_cast<Constant*>(CE->getOperand(0));






More information about the llvm-commits mailing list