[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LowerGC.cpp
LLVM
llvm at cs.uiuc.edu
Sun Jul 18 01:34:29 PDT 2004
Changes in directory llvm/lib/Transforms/Scalar:
LowerGC.cpp updated: 1.3 -> 1.4
---
Log message:
Expand the coercion of constants to include the newly constant Globals.
---
Diffs of the changes: (+1 -2)
Index: llvm/lib/Transforms/Scalar/LowerGC.cpp
diff -u llvm/lib/Transforms/Scalar/LowerGC.cpp:1.3 llvm/lib/Transforms/Scalar/LowerGC.cpp:1.4
--- llvm/lib/Transforms/Scalar/LowerGC.cpp:1.3 Sat Jul 17 19:29:57 2004
+++ llvm/lib/Transforms/Scalar/LowerGC.cpp Sun Jul 18 03:34:19 2004
@@ -140,8 +140,7 @@
/// not have the specified type, insert a cast.
static void Coerce(Instruction *I, unsigned OpNum, Type *Ty) {
if (I->getOperand(OpNum)->getType() != Ty) {
- Constant *C = dyn_cast<Constant>(I->getOperand(OpNum));
- if (C && !isa<GlobalValue>(I->getOperand(OpNum)))
+ if (Constant *C = dyn_cast<Constant>(I->getOperand(OpNum)))
I->setOperand(OpNum, ConstantExpr::getCast(C, Ty));
else {
CastInst *C = new CastInst(I->getOperand(OpNum), Ty, "", I);
More information about the llvm-commits
mailing list