From 49954ca014a0511a970092efab3a79f3dd7e39f5 Mon Sep 17 00:00:00 2001 From: John McCall Date: Wed, 12 Dec 2012 22:21:47 +0000 Subject: Rewrite calls to bitcast unprototyped functions when emitting a definition. My variadics patch, r169588, changed these calls to typically be bitcasts rather than calls to a supposedly variadic function. This totally subverted a hack where we intentionally dropped excess arguments from such calls in order to appease the inliner and a "warning" from the optimizer. This patch extends the hack to also work with bitcasts, as well as teaching it to rewrite invokes. llvm-svn: 170034 --- clang/test/CodeGen/functions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/test/CodeGen/functions.c') diff --git a/clang/test/CodeGen/functions.c b/clang/test/CodeGen/functions.c index 28e4bd0c829..8241a3d1674 100644 --- a/clang/test/CodeGen/functions.c +++ b/clang/test/CodeGen/functions.c @@ -24,7 +24,7 @@ void f0() {} void f1(); void f2(void) { -// CHECK: call void bitcast (void ()* @f1 to void (i32, i32, i32)*)(i32 1, i32 2, i32 3) +// CHECK: call void @f1() f1(1, 2, 3); } // CHECK: define void @f1() -- cgit v1.2.3