diff --git a/lib/Transforms/IPO/IPConstantPropagation.cpp b/lib/Transforms/IPO/IPConstantPropagation.cpp index 0195231701f..36ac2023c1d 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(*AI)) { - Constant *C = dyn_cast(*AI); - + if (Constant *C = dyn_cast(*AI)) { if (!ArgumentConstants[i].first) ArgumentConstants[i].first = C; else if (ArgumentConstants[i].first != C) {