diff options
author | Jay Foad <jay.foad@gmail.com> | 2009-06-06 17:49:35 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@gmail.com> | 2009-06-06 17:49:35 +0000 |
commit | 0906b1bf09769d5301e62d372b363b4cd0b5a6c7 (patch) | |
tree | b37b3d75d6b4743281197a07027cf19886b6036a /lib/Transforms/IPO/IPConstantPropagation.cpp | |
parent | 86fbf2fe4cae21febffa4bb2f64cd0c2ee834694 (diff) | |
download | external_llvm-0906b1bf09769d5301e62d372b363b4cd0b5a6c7.zip external_llvm-0906b1bf09769d5301e62d372b363b4cd0b5a6c7.tar.gz external_llvm-0906b1bf09769d5301e62d372b363b4cd0b5a6c7.tar.bz2 |
Use cast<> instead of dyn_cast<> for things that are known to be
Instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73002 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/IPConstantPropagation.cpp')
-rw-r--r-- | lib/Transforms/IPO/IPConstantPropagation.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/Transforms/IPO/IPConstantPropagation.cpp b/lib/Transforms/IPO/IPConstantPropagation.cpp index 2dc8558..e4a9dea 100644 --- a/lib/Transforms/IPO/IPConstantPropagation.cpp +++ b/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)) |