From ccce8bae14a8539e7c9e8d694e2126dd30dc774f Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Tue, 5 Jan 2010 13:12:22 +0000 Subject: Avoid going through the LLVMContext for type equality where it's safe to dereference the type pointer. llvm-svn: 92726 --- llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp') diff --git a/llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp b/llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp index 30cb94d9038..3fa8b70a850 100644 --- a/llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp +++ b/llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp @@ -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... -- cgit v1.2.3