diff options
author | Chris Lattner <sabre@nondot.org> | 2002-05-06 16:15:30 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-05-06 16:15:30 +0000 |
commit | 9b625030c8427a3bc56f5993c0b5b214c393042f (patch) | |
tree | 40bf688c425d93346f3f3a1119f4a9049682724e /lib/Analysis/InductionVariable.cpp | |
parent | d44023ecb7a699e52f119bec0eb86830989ff35a (diff) | |
download | external_llvm-9b625030c8427a3bc56f5993c0b5b214c393042f.tar.gz external_llvm-9b625030c8427a3bc56f5993c0b5b214c393042f.tar.bz2 external_llvm-9b625030c8427a3bc56f5993c0b5b214c393042f.zip |
Replace all usages of Type::isPointerType with isa<PointerType>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2486 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/InductionVariable.cpp')
-rw-r--r-- | lib/Analysis/InductionVariable.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Analysis/InductionVariable.cpp b/lib/Analysis/InductionVariable.cpp index f0b01e8455..b3da95f090 100644 --- a/lib/Analysis/InductionVariable.cpp +++ b/lib/Analysis/InductionVariable.cpp @@ -99,7 +99,7 @@ InductionVariable::InductionVariable(PHINode *P, LoopInfo *LoopInfo) { // Okay, we have found an induction variable. Save the start and step values const Type *ETy = Phi->getType(); - if (ETy->isPointerType()) ETy = Type::ULongTy; + if (isa<PointerType>(ETy)) ETy = Type::ULongTy; Start = (Value*)(E1.Offset ? E1.Offset : ConstantInt::get(ETy, 0)); Step = (Value*)(E2.Offset ? E2.Offset : ConstantInt::get(ETy, 0)); @@ -132,7 +132,7 @@ InductionVariable::InductionVariable(PHINode *P, LoopInfo *LoopInfo) { StepE.Var != Phi) return; const Type *ETy = Phi->getType(); - if (ETy->isPointerType()) ETy = Type::ULongTy; + if (isa<PointerType>(ETy)) ETy = Type::ULongTy; Step = (Value*)(StepE.Offset ? StepE.Offset : ConstantInt::get(ETy, 0)); } else { // We were able to get a step value, simplify with expr analysis ExprType StepE = analysis::ClassifyExpression(Step); @@ -145,7 +145,7 @@ InductionVariable::InductionVariable(PHINode *P, LoopInfo *LoopInfo) { else Step = Constant::getNullValue(Step->getType()); const Type *ETy = Phi->getType(); - if (ETy->isPointerType()) ETy = Type::ULongTy; + if (isa<PointerType>(ETy)) ETy = Type::ULongTy; Step = (Value*)(StepE.Offset ? StepE.Offset : ConstantInt::get(ETy,0)); } } |