Revert 100158 in case it is causing some of the buildbot problems.
[oota-llvm.git] / lib / Transforms / Utils / UnifyFunctionExitNodes.cpp
index 30cb94d9038570f13e35b82ca0687249dfa5b3b9..3fa8b70a8505a37e962f7e28d11e8d1b3f852035 100644 (file)
@@ -112,7 +112,7 @@ bool UnifyFunctionExitNodes::runOnFunction(Function &F) {
                                                "UnifiedReturnBlock", &F);
 
   PHINode *PN = 0;
-  if (F.getReturnType() == Type::getVoidTy(F.getContext())) {
+  if (F.getReturnType()->isVoidTy()) {
     ReturnInst::Create(F.getContext(), NULL, NewRetBlock);
   } else {
     // If the function doesn't return void... add a PHI node to the block...