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 | 1df9859c40492511b8aa4321eb76496005d3b75b (patch) | |
tree | 3e65bf258ff243ac3c149c418c7f201fbc9097d6 /lib/Transforms/IPO/DeadArgumentElimination.cpp | |
parent | 30fb00aac02682cf1edef9f89b905621aa7a3c04 (diff) | |
download | llvm-1df9859c40492511b8aa4321eb76496005d3b75b.tar.gz llvm-1df9859c40492511b8aa4321eb76496005d3b75b.tar.bz2 llvm-1df9859c40492511b8aa4321eb76496005d3b75b.tar.xz |
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
Diffstat (limited to 'lib/Transforms/IPO/DeadArgumentElimination.cpp')
-rw-r--r-- | lib/Transforms/IPO/DeadArgumentElimination.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/IPO/DeadArgumentElimination.cpp b/lib/Transforms/IPO/DeadArgumentElimination.cpp index 1749b1eff3..f386ed78b5 100644 --- a/lib/Transforms/IPO/DeadArgumentElimination.cpp +++ b/lib/Transforms/IPO/DeadArgumentElimination.cpp @@ -796,7 +796,7 @@ bool DAE::RemoveDeadStuffFromFunction(Function *F) { // Replace by null for now. Call->replaceAllUsesWith(Constant::getNullValue(Call->getType())); } else { - assert(isa<StructType>(RetTy) && + assert(RetTy->isStructTy() && "Return type changed, but not into a void. The old return type" " must have been a struct!"); Instruction *InsertPt = Call; @@ -870,7 +870,7 @@ bool DAE::RemoveDeadStuffFromFunction(Function *F) { if (NFTy->getReturnType() == Type::getVoidTy(F->getContext())) { RetVal = 0; } else { - assert (isa<StructType>(RetTy)); + assert (RetTy->isStructTy()); // The original return value was a struct, insert // extractvalue/insertvalue chains to extract only the values we need // to return and insert them into our new result. |