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/GlobalOpt.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/GlobalOpt.cpp')
| -rw-r--r-- | lib/Transforms/IPO/GlobalOpt.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Transforms/IPO/GlobalOpt.cpp b/lib/Transforms/IPO/GlobalOpt.cpp index 2c01cc3..5f12825 100644 --- a/lib/Transforms/IPO/GlobalOpt.cpp +++ b/lib/Transforms/IPO/GlobalOpt.cpp @@ -932,8 +932,7 @@ static bool ValueIsOnlyUsedLocallyOrStoredToOneGlobal(Instruction *V, GlobalVariable *GV, SmallPtrSet<PHINode*, 8> &PHIs) { for (Value::use_iterator UI = V->use_begin(), E = V->use_end(); UI != E;++UI){ - Instruction *Inst = dyn_cast<Instruction>(*UI); - if (Inst == 0) return false; + Instruction *Inst = cast<Instruction>(*UI); if (isa<LoadInst>(Inst) || isa<CmpInst>(Inst)) { continue; // Fine, ignore. |
