From 8b418685e9e4f02f4eb2a76e1ec063e07552b68d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 7 Feb 2012 00:39:47 +0000 Subject: simplify a bunch of code to use the well-known LLVM IR types computed by CodeGenModule. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149943 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenFunction.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/CodeGen/CodeGenFunction.cpp') diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index 5c21b0762b..d5379a5693 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -229,8 +229,7 @@ void CodeGenFunction::EmitFunctionInstrumentation(const char *Fn) { llvm::PointerType *PointerTy = Int8PtrTy; llvm::Type *ProfileFuncArgs[] = { PointerTy, PointerTy }; llvm::FunctionType *FunctionTy = - llvm::FunctionType::get(llvm::Type::getVoidTy(getLLVMContext()), - ProfileFuncArgs, false); + llvm::FunctionType::get(VoidTy, ProfileFuncArgs, false); llvm::Constant *F = CGM.CreateRuntimeFunction(FunctionTy, Fn); llvm::CallInst *CallSite = Builder.CreateCall( @@ -244,8 +243,7 @@ void CodeGenFunction::EmitFunctionInstrumentation(const char *Fn) { } void CodeGenFunction::EmitMCountInstrumentation() { - llvm::FunctionType *FTy = - llvm::FunctionType::get(llvm::Type::getVoidTy(getLLVMContext()), false); + llvm::FunctionType *FTy = llvm::FunctionType::get(VoidTy, false); llvm::Constant *MCountFn = CGM.CreateRuntimeFunction(FTy, Target.getMCountName()); -- cgit v1.2.3