diff options
author | John McCall <rjmccall@apple.com> | 2012-12-07 07:03:17 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2012-12-07 07:03:17 +0000 |
commit | e56bb36e8eea89bae7dfe6eb6ea0455af126bf4a (patch) | |
tree | c6ac1420506da704a1f788684944e958214e818e /lib/CodeGen/CodeGenTypes.h | |
parent | 8fda1ab0fbfeac24489906d0bd6714c337f66e0f (diff) |
Fix the required args count for variadic blocks.
We were emitting calls to blocks as if all arguments were
required --- i.e. with signature (A,B,C,D,...) rather than
(A,B,...). This patch fixes that and accounts for the
implicit block-context argument as a required argument.
In addition, this patch changes the function type under which
we call unprototyped functions on platforms like x86-64 that
guarantee compatibility of variadic functions with unprototyped
function types; previously we would always call such functions
under the LLVM type T (...)*, but now we will call them under
the type T (A,B,C,D,...)*. This last change should have no
material effect except for making the type conventions more
explicit; it was a side-effect of the most convenient implementation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169588 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenTypes.h')
-rw-r--r-- | lib/CodeGen/CodeGenTypes.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenTypes.h b/lib/CodeGen/CodeGenTypes.h index b3dda5096e..173c7ea2ba 100644 --- a/lib/CodeGen/CodeGenTypes.h +++ b/lib/CodeGen/CodeGenTypes.h @@ -58,6 +58,7 @@ namespace CodeGen { /// CodeGenTypes - This class organizes the cross-module state that is used /// while lowering AST types to LLVM types. class CodeGenTypes { +public: // Some of this stuff should probably be left on the CGM. ASTContext &Context; const TargetInfo &Target; @@ -68,6 +69,7 @@ class CodeGenTypes { const CodeGenOptions &CodeGenOpts; CodeGenModule &CGM; +private: /// The opaque type map for Objective-C interfaces. All direct /// manipulation is done by the runtime interfaces, which are /// responsible for coercing to the appropriate type; these opaque @@ -195,6 +197,8 @@ public: const CallArgList &args, FunctionType::ExtInfo info, RequiredArgs required); + const CGFunctionInfo &arrangeBlockFunctionCall(const CallArgList &args, + const FunctionType *type); const CGFunctionInfo &arrangeCXXMethodCall(const CallArgList &args, const FunctionProtoType *type, |