aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2009-06-06 17:49:35 +0000
committerJay Foad <jay.foad@gmail.com>2009-06-06 17:49:35 +0000
commite57ba2eab58d46c55c1327983f9c2c7a69e65fce (patch)
tree16b38b10719ca667015afa892ab67d7649954caf /llvm/lib/Transforms/IPO/IPConstantPropagation.cpp
parent800c20f11a1df646eba1e1a8e6ea4ed44f3e3ad2 (diff)
downloadllvm-e57ba2eab58d46c55c1327983f9c2c7a69e65fce.zip
llvm-e57ba2eab58d46c55c1327983f9c2c7a69e65fce.tar.gz
llvm-e57ba2eab58d46c55c1327983f9c2c7a69e65fce.tar.bz2
Use cast<> instead of dyn_cast<> for things that are known to be
Instructions. llvm-svn: 73002
Diffstat (limited to 'llvm/lib/Transforms/IPO/IPConstantPropagation.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/IPConstantPropagation.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp b/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp
index 2dc85582..e4a9dea 100644
--- a/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp
+++ b/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp
@@ -241,15 +241,11 @@ bool IPCP::PropagateConstantReturn(Function &F) {
for (Value::use_iterator I = Call->use_begin(), E = Call->use_end();
I != E;) {
- Instruction *Ins = dyn_cast<Instruction>(*I);
+ Instruction *Ins = cast<Instruction>(*I);
// Increment now, so we can remove the use
++I;
- // Not an instruction? Ignore
- if (!Ins)
- continue;
-
// Find the index of the retval to replace with
int index = -1;
if (ExtractValueInst *EV = dyn_cast<ExtractValueInst>(Ins))