summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2011-03-01 17:28:13 +0000
committerFariborz Jahanian <fjahanian@apple.com>2011-03-01 17:28:13 +0000
commitcf7f66f16f556e9c9a63a12adc7b3e0140b20cd1 (patch)
treea6818c5960c9ff09b1ca8a380d849f35c767b208 /clang/lib/CodeGen/CGCall.cpp
parentb3a58b08e0430ba08de73026a3ff264d467190cc (diff)
downloadbcm5719-llvm-cf7f66f16f556e9c9a63a12adc7b3e0140b20cd1.tar.gz
bcm5719-llvm-cf7f66f16f556e9c9a63a12adc7b3e0140b20cd1.zip
objc IRGen for Next runtime message API.
The prototype for objc_msgSend() is technically variadic - `id objc_msgSend(id, SEL, ...)`. But all method calls should use a prototype that matches the method, not the prototype for objc_msgSend itself(). // rdar://9048030 llvm-svn: 126754
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r--clang/lib/CodeGen/CGCall.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index ae84b6196df..1d9a9a6a8ce 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -1275,7 +1275,8 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
if (CE->getOpcode() == llvm::Instruction::BitCast &&
ActualFT->getReturnType() == CurFT->getReturnType() &&
ActualFT->getNumParams() == CurFT->getNumParams() &&
- ActualFT->getNumParams() == Args.size()) {
+ ActualFT->getNumParams() == Args.size() &&
+ (CurFT->isVarArg() || !ActualFT->isVarArg())) {
bool ArgsMatch = true;
for (unsigned i = 0, e = ActualFT->getNumParams(); i != e; ++i)
if (ActualFT->getParamType(i) != CurFT->getParamType(i)) {
OpenPOWER on IntegriCloud