Use isVoidTy()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84118 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp
index 1574115..756fbf3 100644
--- a/lib/Transforms/Scalar/LICM.cpp
+++ b/lib/Transforms/Scalar/LICM.cpp
@@ -489,7 +489,7 @@
// If I has users in unreachable blocks, eliminate.
// If I is not void type then replaceAllUsesWith undef.
// This allows ValueHandlers and custom metadata to adjust itself.
- if (I.getType() != Type::getVoidTy(I.getContext()))
+ if (!I.getType()->isVoidTy())
I.replaceAllUsesWith(UndefValue::get(I.getType()));
I.eraseFromParent();
} else {
@@ -505,7 +505,7 @@
// If I has users in unreachable blocks, eliminate.
// If I is not void type then replaceAllUsesWith undef.
// This allows ValueHandlers and custom metadata to adjust itself.
- if (I.getType() != Type::getVoidTy(I.getContext()))
+ if (!I.getType()->isVoidTy())
I.replaceAllUsesWith(UndefValue::get(I.getType()));
I.eraseFromParent();
} else {
@@ -516,7 +516,7 @@
// Firstly, we create a stack object to hold the value...
AllocaInst *AI = 0;
- if (I.getType() != Type::getVoidTy(I.getContext())) {
+ if (!I.getType()->isVoidTy()) {
AI = new AllocaInst(I.getType(), 0, I.getName(),
I.getParent()->getParent()->getEntryBlock().begin());
CurAST->add(AI);