Push LLVMContexts through the IntegerType APIs.
[oota-llvm.git] / lib / Transforms / Scalar / LICM.cpp
index 02a33a7889e01833b8865243529ddb751e40c19e..f4f20e4a52c7ed0c58bffdfd267909c6f132ed7a 100644 (file)
@@ -510,7 +510,7 @@ void LICM::sink(Instruction &I) {
     // Firstly, we create a stack object to hold the value...
     AllocaInst *AI = 0;
 
-    if (I.getType() != Type::VoidTy) {
+    if (I.getType() != Type::getVoidTy(I.getContext())) {
       AI = new AllocaInst(I.getType(), 0, I.getName(),
                           I.getParent()->getParent()->getEntryBlock().begin());
       CurAST->add(AI);