diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-01-27 19:42:43 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-01-27 19:42:43 +0000 |
commit | 5a37e950e1dcfe1a15344b4e00f41841c74b51a8 (patch) | |
tree | f620b265090b41ac6de445f3f40c72ad39ce637b /llvm/lib/Transforms/IPO | |
parent | 8688e078ae249f634f7162cbce41c957fe4605b4 (diff) | |
download | bcm5719-llvm-5a37e950e1dcfe1a15344b4e00f41841c74b51a8.tar.gz bcm5719-llvm-5a37e950e1dcfe1a15344b4e00f41841c74b51a8.zip |
Use dyn_cast instead of isa+cast.
llvm-svn: 124404
Diffstat (limited to 'llvm/lib/Transforms/IPO')
-rw-r--r-- | llvm/lib/Transforms/IPO/MergeFunctions.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/IPO/MergeFunctions.cpp b/llvm/lib/Transforms/IPO/MergeFunctions.cpp index fb55d7ce4f0..9abb99d04d3 100644 --- a/llvm/lib/Transforms/IPO/MergeFunctions.cpp +++ b/llvm/lib/Transforms/IPO/MergeFunctions.cpp @@ -460,9 +460,8 @@ bool FunctionComparator::Enumerate(const Value *V1, const Value *V2) { if (V1 == F2 && V2 == F1) return true; - if (isa<Constant>(V1)) { + if (Constant *C1 = dyn_cast<Constant>(V1)) { if (V1 == V2) return true; - const Constant *C1 = cast<Constant>(V1); const Constant *C2 = dyn_cast<Constant>(V2); if (!C2) return false; // TODO: constant expressions with GEP or references to F1 or F2. |