Use isa instead of dyn_cast when the result is only converted to bool.
llvm-svn: 78685
diff --git a/llvm/include/llvm/Support/IRBuilder.h b/llvm/include/llvm/Support/IRBuilder.h
index a8663d2..33ceb69 100644
--- a/llvm/include/llvm/Support/IRBuilder.h
+++ b/llvm/include/llvm/Support/IRBuilder.h
@@ -363,7 +363,7 @@
// Every index must be constant.
InputIterator i;
for (i = IdxBegin; i < IdxEnd; ++i) {
- if (!dyn_cast<Constant>(*i))
+ if (!isa<Constant>(*i))
break;
}
if (i == IdxEnd)
diff --git a/llvm/lib/Analysis/IPA/Andersens.cpp b/llvm/lib/Analysis/IPA/Andersens.cpp
index ef29f70..39f4989 100644
--- a/llvm/lib/Analysis/IPA/Andersens.cpp
+++ b/llvm/lib/Analysis/IPA/Andersens.cpp
@@ -997,7 +997,7 @@
if (!isa<PointerType>(V->getType())) return true;
for (Value::use_iterator UI = V->use_begin(), E = V->use_end(); UI != E; ++UI)
- if (dyn_cast<LoadInst>(*UI)) {
+ if (isa<LoadInst>(*UI)) {
return false;
} else if (StoreInst *SI = dyn_cast<StoreInst>(*UI)) {
if (V == SI->getOperand(1)) {
@@ -1028,7 +1028,7 @@
} else if (ICmpInst *ICI = dyn_cast<ICmpInst>(*UI)) {
if (!isa<ConstantPointerNull>(ICI->getOperand(1)))
return true; // Allow comparison against null.
- } else if (dyn_cast<FreeInst>(*UI)) {
+ } else if (isa<FreeInst>(*UI)) {
return false;
} else {
return true;