diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-11-02 08:18:15 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-11-02 08:18:15 +0000 |
commit | 3054b140595c800101e0286e43f79794b1e96d4f (patch) | |
tree | 8a8835b8c701748a284a217a66c594cceff6ab5e /llvm/lib/VMCore/ConstantFolding.cpp | |
parent | b20b6857f31c6acfe3fd27f859b021ea19d90b17 (diff) | |
download | bcm5719-llvm-3054b140595c800101e0286e43f79794b1e96d4f.tar.gz bcm5719-llvm-3054b140595c800101e0286e43f79794b1e96d4f.zip |
Remove unused variables.
llvm-svn: 31375
Diffstat (limited to 'llvm/lib/VMCore/ConstantFolding.cpp')
-rw-r--r-- | llvm/lib/VMCore/ConstantFolding.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/VMCore/ConstantFolding.cpp b/llvm/lib/VMCore/ConstantFolding.cpp index 7d55f7ed4d8..055d41c063d 100644 --- a/llvm/lib/VMCore/ConstantFolding.cpp +++ b/llvm/lib/VMCore/ConstantFolding.cpp @@ -809,7 +809,7 @@ Constant *llvm::ConstantFoldCastInstruction(const Constant *V, if (V->getType() == DestTy) return (Constant*)V; // Cast of a global address to boolean is always true. - if (const GlobalValue *GV = dyn_cast<GlobalValue>(V)) { + if (isa<GlobalValue>(V)) { if (DestTy == Type::BoolTy) // FIXME: When we support 'external weak' references, we have to prevent // this transformation from happening. This code will need to be updated @@ -962,7 +962,7 @@ Constant *llvm::ConstantFoldInsertElementInstruction(const Constant *Val, const ConstantInt *CIdx = dyn_cast<ConstantInt>(Idx); if (!CIdx) return 0; uint64_t idxVal = CIdx->getZExtValue(); - if (const UndefValue *UVal = dyn_cast<UndefValue>(Val)) { + if (isa<UndefValue>(Val)) { // Insertion of scalar constant into packed undef // Optimize away insertion of undef if (isa<UndefValue>(Elt)) @@ -980,8 +980,7 @@ Constant *llvm::ConstantFoldInsertElementInstruction(const Constant *Val, } return ConstantPacked::get(Ops); } - if (const ConstantAggregateZero *CVal = - dyn_cast<ConstantAggregateZero>(Val)) { + if (isa<ConstantAggregateZero>(Val)) { // Insertion of scalar constant into packed aggregate zero // Optimize away insertion of zero if (Elt->isNullValue()) @@ -1387,7 +1386,7 @@ Constant *llvm::ConstantFoldBinaryInstruction(unsigned Opcode, } if (const ConstantExpr *CE1 = dyn_cast<ConstantExpr>(V1)) { - if (const ConstantExpr *CE2 = dyn_cast<ConstantExpr>(V2)) { + if (isa<ConstantExpr>(V2)) { // There are many possible foldings we could do here. We should probably // at least fold add of a pointer with an integer into the appropriate // getelementptr. This will improve alias analysis a bit. @@ -1444,7 +1443,7 @@ Constant *llvm::ConstantFoldBinaryInstruction(unsigned Opcode, } } - } else if (const ConstantExpr *CE2 = dyn_cast<ConstantExpr>(V2)) { + } else if (isa<ConstantExpr>(V2)) { // If V2 is a constant expr and V1 isn't, flop them around and fold the // other way if possible. switch (Opcode) { |