mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
There are two ways of checking for a given type, for example isa<PointerType>(T)
and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96344 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -115,11 +115,11 @@ bool AAEval::runOnFunction(Function &F) {
|
||||
SetVector<CallSite> CallSites;
|
||||
|
||||
for (Function::arg_iterator I = F.arg_begin(), E = F.arg_end(); I != E; ++I)
|
||||
if (isa<PointerType>(I->getType())) // Add all pointer arguments
|
||||
if (I->getType()->isPointerTy()) // Add all pointer arguments
|
||||
Pointers.insert(I);
|
||||
|
||||
for (inst_iterator I = inst_begin(F), E = inst_end(F); I != E; ++I) {
|
||||
if (isa<PointerType>(I->getType())) // Add all pointer instructions
|
||||
if (I->getType()->isPointerTy()) // Add all pointer instructions
|
||||
Pointers.insert(&*I);
|
||||
Instruction &Inst = *I;
|
||||
User::op_iterator OI = Inst.op_begin();
|
||||
@ -128,7 +128,7 @@ bool AAEval::runOnFunction(Function &F) {
|
||||
isa<Function>(CS.getCalledValue()))
|
||||
++OI; // Skip actual functions for direct function calls.
|
||||
for (; OI != Inst.op_end(); ++OI)
|
||||
if (isa<PointerType>((*OI)->getType()) && !isa<ConstantPointerNull>(*OI))
|
||||
if ((*OI)->getType()->isPointerTy() && !isa<ConstantPointerNull>(*OI))
|
||||
Pointers.insert(*OI);
|
||||
|
||||
if (CS.getInstruction()) CallSites.insert(CS);
|
||||
|
Reference in New Issue
Block a user