diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-09-17 04:01:40 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-09-17 04:01:40 +0000 |
commit | 6793966aa221764f579cc8436bd641e1ec339c6d (patch) | |
tree | 59d986d3495f4be51b1c187fa7809d11ba1621c8 /lib/CodeGen/CGObjCMac.cpp | |
parent | d6c93d703541c992e06eb9a59a2d826a30da65b2 (diff) |
IRgen/ObjC: Correctly construct the function info for variadic message sends.
This fixes some bad -O0 codegen and the unnecessary clearing of al on entry to objc_msgSend for most message sends.
<rdar://problem/7102824> [irgen] unnecessary xorb on calls to objc_msgSend on x86_64
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82118 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjCMac.cpp')
-rw-r--r-- | lib/CodeGen/CGObjCMac.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp index a76e30223e..a3ff4be800 100644 --- a/lib/CodeGen/CGObjCMac.cpp +++ b/lib/CodeGen/CGObjCMac.cpp @@ -1530,9 +1530,8 @@ CGObjCCommonMac::EmitLegacyMessageSend(CodeGen::CodeGenFunction &CGF, CodeGenTypes &Types = CGM.getTypes(); const CGFunctionInfo &FnInfo = Types.getFunctionInfo(ResultType, ActualArgs); - // In 64bit ABI, type must be assumed VARARG. In 32bit abi, - // it seems not to matter. - const llvm::FunctionType *FTy = Types.GetFunctionType(FnInfo, (ObjCABI == 2)); + const llvm::FunctionType *FTy = + Types.GetFunctionType(FnInfo, Method ? Method->isVariadic() : false); llvm::Constant *Fn = NULL; if (CGM.ReturnTypeUsesSret(FnInfo)) { |