From 22e66b434ad793c1ed0c80d228d94e6a522ab49e Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Fri, 11 Apr 2014 01:13:04 +0000 Subject: Cleanup: Add default arguments to CodeGenFunction::StartFunction. Thanks dblaikie for the suggestion! llvm-svn: 206012 --- clang/lib/CodeGen/CGDeclCXX.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'clang/lib/CodeGen/CGDeclCXX.cpp') diff --git a/clang/lib/CodeGen/CGDeclCXX.cpp b/clang/lib/CodeGen/CGDeclCXX.cpp index 558c91be955..640e9fa92de 100644 --- a/clang/lib/CodeGen/CGDeclCXX.cpp +++ b/clang/lib/CodeGen/CGDeclCXX.cpp @@ -178,8 +178,7 @@ static llvm::Constant *createAtExitStub(CodeGenModule &CGM, const VarDecl &VD, CodeGenFunction CGF(CGM); CGF.StartFunction(&VD, CGM.getContext().VoidTy, fn, - CGM.getTypes().arrangeNullaryFunction(), FunctionArgList(), - SourceLocation(), SourceLocation()); + CGM.getTypes().arrangeNullaryFunction(), FunctionArgList()); llvm::CallInst *call = CGF.Builder.CreateCall(dtor, addr); @@ -433,8 +432,7 @@ CodeGenFunction::GenerateCXXGlobalInitFunc(llvm::Function *Fn, ArrayRef Decls, llvm::GlobalVariable *Guard) { StartFunction(GlobalDecl(), getContext().VoidTy, Fn, - getTypes().arrangeNullaryFunction(), - FunctionArgList(), SourceLocation(), SourceLocation()); + getTypes().arrangeNullaryFunction(), FunctionArgList()); llvm::BasicBlock *ExitBlock = 0; if (Guard) { @@ -479,8 +477,7 @@ void CodeGenFunction::GenerateCXXGlobalDtorsFunc(llvm::Function *Fn, const std::vector > &DtorsAndObjects) { StartFunction(GlobalDecl(), getContext().VoidTy, Fn, - getTypes().arrangeNullaryFunction(), - FunctionArgList(), SourceLocation(), SourceLocation()); + getTypes().arrangeNullaryFunction(), FunctionArgList()); // Emit the dtors, in reverse order from construction. for (unsigned i = 0, e = DtorsAndObjects.size(); i != e; ++i) { @@ -510,8 +507,7 @@ llvm::Function *CodeGenFunction::generateDestroyHelper( llvm::Function *fn = CreateGlobalInitOrDestructFunction(CGM, FTy, "__cxx_global_array_dtor"); - StartFunction(VD, getContext().VoidTy, fn, FI, args, - SourceLocation(), SourceLocation()); + StartFunction(VD, getContext().VoidTy, fn, FI, args); emitDestroy(addr, type, destroyer, useEHCleanupForArray); -- cgit v1.2.3