aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/exceptions.c
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2012-12-12 22:21:47 +0000
committerJohn McCall <rjmccall@apple.com>2012-12-12 22:21:47 +0000
commita923c9783e8bd8edd26e56df9eaacd872c43e20e (patch)
treea0ddb0c19d2e9850c71a3f50cb98d3f63411ebce /test/CodeGen/exceptions.c
parentb2c0887457ef509c1a93bcddf9ad8f5e87d9945e (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170034 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/exceptions.c')
-rw-r--r--test/CodeGen/exceptions.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGen/exceptions.c b/test/CodeGen/exceptions.c
index 20eb706a03..311bc84e6a 100644
--- a/test/CodeGen/exceptions.c
+++ b/test/CodeGen/exceptions.c
@@ -19,3 +19,12 @@ void test1() {
// CHECK-ARM: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gcc_personality_sj0 to i8*)
// CHECK-ARM-NEXT: cleanup
}
+
+void test2_helper();
+void test2() {
+ __block int x = 10;
+ test2_helper(5, 6, 7);
+}
+void test2_helper(int x, int y) {
+}
+// CHECK: invoke void @test2_helper(i32 5, i32 6)