diff options
author | Adrian Prantl <aprantl@apple.com> | 2014-04-11 01:13:04 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2014-04-11 01:13:04 +0000 |
commit | 22e66b434ad793c1ed0c80d228d94e6a522ab49e (patch) | |
tree | 1eb235b9e067f5aa0924c032f65865e39799b129 /clang/lib/CodeGen | |
parent | 83e78f5c3c3dbf8a29d615ceb84a70163a38f42e (diff) | |
download | bcm5719-llvm-22e66b434ad793c1ed0c80d228d94e6a522ab49e.tar.gz bcm5719-llvm-22e66b434ad793c1ed0c80d228d94e6a522ab49e.zip |
Cleanup: Add default arguments to CodeGenFunction::StartFunction.
Thanks dblaikie for the suggestion!
llvm-svn: 206012
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGBlocks.cpp | 8 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGDeclCXX.cpp | 12 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGObjC.cpp | 4 | ||||
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 4 |
4 files changed, 12 insertions, 16 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp index c1cbfde4b5e..18cfe49bc33 100644 --- a/clang/lib/CodeGen/CGBlocks.cpp +++ b/clang/lib/CodeGen/CGBlocks.cpp @@ -1307,7 +1307,7 @@ CodeGenFunction::GenerateCopyHelperFunction(const CGBlockInfo &blockInfo) { false); // Create a scope with an artificial location for the body of this function. ArtificialLocation AL(*this, Builder); - StartFunction(FD, C.VoidTy, Fn, FI, args, SourceLocation(), SourceLocation()); + StartFunction(FD, C.VoidTy, Fn, FI, args); AL.Emit(); llvm::Type *structPtrTy = blockInfo.StructureType->getPointerTo(); @@ -1477,7 +1477,7 @@ CodeGenFunction::GenerateDestroyHelperFunction(const CGBlockInfo &blockInfo) { false, false); // Create a scope with an artificial location for the body of this function. ArtificialLocation AL(*this, Builder); - StartFunction(FD, C.VoidTy, Fn, FI, args, SourceLocation(), SourceLocation()); + StartFunction(FD, C.VoidTy, Fn, FI, args); AL.Emit(); llvm::Type *structPtrTy = blockInfo.StructureType->getPointerTo(); @@ -1766,7 +1766,7 @@ generateByrefCopyHelper(CodeGenFunction &CGF, SC_Static, false, false); - CGF.StartFunction(FD, R, Fn, FI, args, SourceLocation(), SourceLocation()); + CGF.StartFunction(FD, R, Fn, FI, args); if (byrefInfo.needsCopy()) { llvm::Type *byrefPtrType = byrefType.getPointerTo(0); @@ -1835,7 +1835,7 @@ generateByrefDisposeHelper(CodeGenFunction &CGF, SourceLocation(), II, R, 0, SC_Static, false, false); - CGF.StartFunction(FD, R, Fn, FI, args, SourceLocation(), SourceLocation()); + CGF.StartFunction(FD, R, Fn, FI, args); if (byrefInfo.needsDispose()) { llvm::Value *V = CGF.GetAddrOfLocalVar(&src); 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<llvm::Constant *> 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<std::pair<llvm::WeakVH, llvm::Constant*> > &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); diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp index b34c19cb942..47a096d5404 100644 --- a/clang/lib/CodeGen/CGObjC.cpp +++ b/clang/lib/CodeGen/CGObjC.cpp @@ -2916,7 +2916,7 @@ CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction( "__assign_helper_atomic_property_", &CGM.getModule()); - StartFunction(FD, C.VoidTy, Fn, FI, args, SourceLocation(), SourceLocation()); + StartFunction(FD, C.VoidTy, Fn, FI, args); DeclRefExpr DstExpr(&dstDecl, false, DestTy, VK_RValue, SourceLocation()); @@ -2994,7 +2994,7 @@ CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction( llvm::Function::Create(LTy, llvm::GlobalValue::InternalLinkage, "__copy_helper_atomic_property_", &CGM.getModule()); - StartFunction(FD, C.VoidTy, Fn, FI, args, SourceLocation(), SourceLocation()); + StartFunction(FD, C.VoidTy, Fn, FI, args); DeclRefExpr SrcExpr(&srcDecl, false, SrcTy, VK_RValue, SourceLocation()); diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 56ad76ae926..7d5a59e99ed 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -1148,8 +1148,8 @@ public: llvm::Function *Fn, const CGFunctionInfo &FnInfo, const FunctionArgList &Args, - SourceLocation Loc, - SourceLocation StartLoc); + SourceLocation Loc = SourceLocation(), + SourceLocation StartLoc = SourceLocation()); void EmitConstructorBody(FunctionArgList &Args); void EmitDestructorBody(FunctionArgList &Args); |