aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-07-18 08:31:18 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-07-18 08:31:18 +0000
commit3188cab9898d30f14bf240a6f9a71754d25c2c4d (patch)
tree8440b236700c7d4df942e20137223e9869faab0f
parentda6cdfa9e885ab8e1eb53b984c0ee77d0d64cd5e (diff)
downloadexternal_llvm-3188cab9898d30f14bf240a6f9a71754d25c2c4d.zip
external_llvm-3188cab9898d30f14bf240a6f9a71754d25c2c4d.tar.gz
external_llvm-3188cab9898d30f14bf240a6f9a71754d25c2c4d.tar.bz2
Avoid an unnecessary isa<Constant>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14963 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/IPO/IPConstantPropagation.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Transforms/IPO/IPConstantPropagation.cpp b/lib/Transforms/IPO/IPConstantPropagation.cpp
index 0195231..36ac202 100644
--- a/lib/Transforms/IPO/IPConstantPropagation.cpp
+++ b/lib/Transforms/IPO/IPConstantPropagation.cpp
@@ -82,9 +82,7 @@ bool IPCP::processFunction(Function &F) {
if (*AI == &F) return false; // Passes the function into itself
if (!ArgumentConstants[i].second) {
- if (isa<Constant>(*AI)) {
- Constant *C = dyn_cast<Constant>(*AI);
-
+ if (Constant *C = dyn_cast<Constant>(*AI)) {
if (!ArgumentConstants[i].first)
ArgumentConstants[i].first = C;
else if (ArgumentConstants[i].first != C) {