From df1fb13a5cc47f589444dddf568c2912d0deaeb9 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sat, 28 May 2011 14:26:31 +0000 Subject: Eliminate temporary argument vectors. llvm-svn: 132260 --- clang/lib/CodeGen/CodeGenFunction.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp') diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 28a4fa4baec..d42057aba03 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -205,16 +205,12 @@ bool CodeGenFunction::ShouldInstrumentFunction() { /// instrumentation function with the current function and the call site, if /// function instrumentation is enabled. void CodeGenFunction::EmitFunctionInstrumentation(const char *Fn) { - const llvm::PointerType *PointerTy; - const llvm::FunctionType *FunctionTy; - std::vector ProfileFuncArgs; - // void __cyg_profile_func_{enter,exit} (void *this_fn, void *call_site); - PointerTy = Int8PtrTy; - ProfileFuncArgs.push_back(PointerTy); - ProfileFuncArgs.push_back(PointerTy); - FunctionTy = llvm::FunctionType::get(llvm::Type::getVoidTy(getLLVMContext()), - ProfileFuncArgs, false); + const llvm::PointerType *PointerTy = Int8PtrTy; + const llvm::Type *ProfileFuncArgs[] = { PointerTy, PointerTy }; + const llvm::FunctionType *FunctionTy = + llvm::FunctionType::get(llvm::Type::getVoidTy(getLLVMContext()), + ProfileFuncArgs, false); llvm::Constant *F = CGM.CreateRuntimeFunction(FunctionTy, Fn); llvm::CallInst *CallSite = Builder.CreateCall( -- cgit v1.2.3