From f012705c7e4ca8cf90b6b734ce1d5355daca5ba5 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92726 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Utils/CodeExtractor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Transforms/Utils/CodeExtractor.cpp') diff --git a/lib/Transforms/Utils/CodeExtractor.cpp b/lib/Transforms/Utils/CodeExtractor.cpp index 3dc330012e..1cd63c65f6 100644 --- a/lib/Transforms/Utils/CodeExtractor.cpp +++ b/lib/Transforms/Utils/CodeExtractor.cpp @@ -593,7 +593,7 @@ emitCallAndSwitchStatement(Function *newFunction, BasicBlock *codeReplacer, // this should be rewritten as a `ret' // Check if the function should return a value - if (OldFnRetTy == Type::getVoidTy(Context)) { + if (OldFnRetTy->isVoidTy()) { ReturnInst::Create(Context, 0, TheSwitch); // Return void } else if (OldFnRetTy == TheSwitch->getCondition()->getType()) { // return what we have -- cgit v1.2.3-18-g5258