diff options
author | Dan Gohman <gohman@apple.com> | 2009-08-11 17:20:16 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-08-11 17:20:16 +0000 |
commit | 4bdbad7ebf985f97ee57b933a68836965b1b67b0 (patch) | |
tree | cbeb0227f0a82d24e4fa4a0885a223405985b045 /llvm/lib | |
parent | 6fdf5484c9d9198086e6aa3ac14aa1039750eb94 (diff) | |
download | bcm5719-llvm-4bdbad7ebf985f97ee57b933a68836965b1b67b0.tar.gz bcm5719-llvm-4bdbad7ebf985f97ee57b933a68836965b1b67b0.zip |
Use isa instead of dyn_cast when the result is only converted to bool.
llvm-svn: 78685
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Analysis/IPA/Andersens.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/IPA/Andersens.cpp b/llvm/lib/Analysis/IPA/Andersens.cpp index ef29f701b52..39f4989b9b0 100644 --- a/llvm/lib/Analysis/IPA/Andersens.cpp +++ b/llvm/lib/Analysis/IPA/Andersens.cpp @@ -997,7 +997,7 @@ bool Andersens::AnalyzeUsesOfFunction(Value *V) { 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 @@ bool Andersens::AnalyzeUsesOfFunction(Value *V) { } 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; |