diff options
author | Duncan Sands <baldrick@free.fr> | 2010-02-16 11:11:14 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2010-02-16 11:11:14 +0000 |
commit | 19d0b47b1f58f913f9d39f0e2b0eb470f04ba82f (patch) | |
tree | d692f99bcaf8ceb28f12c941b517898ee7faedd3 /llvm/tools | |
parent | d7d8afabd0498537b27b667151770b6b56691966 (diff) | |
download | bcm5719-llvm-19d0b47b1f58f913f9d39f0e2b0eb470f04ba82f.tar.gz bcm5719-llvm-19d0b47b1f58f913f9d39f0e2b0eb470f04ba82f.zip |
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.
llvm-svn: 96344
Diffstat (limited to 'llvm/tools')
-rw-r--r-- | llvm/tools/bugpoint/CrashDebugger.cpp | 2 | ||||
-rw-r--r-- | llvm/tools/bugpoint/ExtractFunction.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/tools/bugpoint/CrashDebugger.cpp b/llvm/tools/bugpoint/CrashDebugger.cpp index b348a0875e4..b51bdb45093 100644 --- a/llvm/tools/bugpoint/CrashDebugger.cpp +++ b/llvm/tools/bugpoint/CrashDebugger.cpp @@ -295,7 +295,7 @@ bool ReduceCrashingBlocks::TestBlocks(std::vector<const BasicBlock*> &BBs) { TerminatorInst *BBTerm = BB->getTerminator(); - if (isa<StructType>(BBTerm->getType())) + if (BBTerm->getType()->isStructTy()) BBTerm->replaceAllUsesWith(UndefValue::get(BBTerm->getType())); else if (BB->getTerminator()->getType() != Type::getVoidTy(BB->getContext())) diff --git a/llvm/tools/bugpoint/ExtractFunction.cpp b/llvm/tools/bugpoint/ExtractFunction.cpp index 70011a798b9..eaa2c538d96 100644 --- a/llvm/tools/bugpoint/ExtractFunction.cpp +++ b/llvm/tools/bugpoint/ExtractFunction.cpp @@ -73,7 +73,7 @@ Module *BugDriver::deleteInstructionFromProgram(const Instruction *I, Instruction *TheInst = RI; // Got the corresponding instruction! // If this instruction produces a value, replace any users with null values - if (isa<StructType>(TheInst->getType())) + if (TheInst->getType()->isStructTy()) TheInst->replaceAllUsesWith(UndefValue::get(TheInst->getType())); else if (TheInst->getType() != Type::getVoidTy(I->getContext())) TheInst->replaceAllUsesWith(Constant::getNullValue(TheInst->getType())); |