diff options
author | John McCall <rjmccall@apple.com> | 2011-03-09 04:27:21 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-03-09 04:27:21 +0000 |
commit | d26bc76c98006609002d9930f8840490e88ac5b5 (patch) | |
tree | f2a0c8ea750e38c4e98b006f171b137a0625f0f9 /lib/CodeGen/CodeGenFunction.h | |
parent | eecf5fa12d5426637c47d7072f0c193a8d7ff68b (diff) |
Use the "undergoes default argument promotion" bit on parameters to
simplify the logic of initializing function parameters so that we don't need
both a variable declaration and a type in FunctionArgList. This also means
that we need to propagate the CGFunctionInfo down in a lot of places rather
than recalculating it from the FAL. There's more we can do to eliminate
redundancy here, and I've left FIXMEs behind to do it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127314 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | lib/CodeGen/CodeGenFunction.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index 6864f15f8f..cc9fd32e1a 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -25,7 +25,6 @@ #include "llvm/Support/ValueHandle.h" #include "CodeGenModule.h" #include "CGBuilder.h" -#include "CGCall.h" #include "CGValue.h" namespace llvm { @@ -1130,9 +1129,11 @@ public: llvm::Value *GetAddrOfBlockDecl(const VarDecl *var, bool ByRef); const llvm::Type *BuildByRefType(const VarDecl *var); - void GenerateCode(GlobalDecl GD, llvm::Function *Fn); + void GenerateCode(GlobalDecl GD, llvm::Function *Fn, + const CGFunctionInfo &FnInfo); void StartFunction(GlobalDecl GD, QualType RetTy, llvm::Function *Fn, + const CGFunctionInfo &FnInfo, const FunctionArgList &Args, SourceLocation StartLoc); @@ -1149,7 +1150,8 @@ public: void FinishFunction(SourceLocation EndLoc=SourceLocation()); /// GenerateThunk - Generate a thunk for the given method. - void GenerateThunk(llvm::Function *Fn, GlobalDecl GD, const ThunkInfo &Thunk); + void GenerateThunk(llvm::Function *Fn, const CGFunctionInfo &FnInfo, + GlobalDecl GD, const ThunkInfo &Thunk); void EmitCtorPrologue(const CXXConstructorDecl *CD, CXXCtorType Type, FunctionArgList &Args); @@ -2036,7 +2038,8 @@ public: const std::vector<std::pair<llvm::WeakVH, llvm::Constant*> > &DtorsAndObjects); - void GenerateCXXGlobalVarDeclInitFunc(llvm::Function *Fn, const VarDecl *D, + void GenerateCXXGlobalVarDeclInitFunc(llvm::Function *Fn, + const VarDecl *D, llvm::GlobalVariable *Addr); void EmitCXXConstructExpr(const CXXConstructExpr *E, AggValueSlot Dest); |