1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck %s
6 // test1 should be compmiled to be a varargs function in the IR even
7 // though there is no way to do a va_begin. Otherwise, the optimizer
8 // will warn about 'dropped arguments' at the call site.
10 // CHECK-LABEL: define{{.*}} i32 @_ZN5test05test1Ez(...)
15 // CHECK: call noundef i32 (...) @_ZN5test05test1Ez(i32 noundef 0)
33 // CHECK-LABEL: define{{.*}} void @_ZN5test14testEv()
34 // CHECK: [[X:%.*]] = alloca [[A:%.*]], align 4
35 // CHECK-NEXT: [[TMP:%.*]] = alloca [[A]], align 4
36 // CHECK-NEXT: [[T0:%.*]] = bitcast [[A]]* [[TMP]] to i8*
37 // CHECK-NEXT: [[T1:%.*]] = bitcast [[A]]* [[X]] to i8*
38 // CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 [[T0]], i8* align 4 [[T1]], i64 8, i1 false)
39 // CHECK-NEXT: [[T0:%.*]] = bitcast [[A]]* [[TMP]] to i64*
40 // CHECK-NEXT: [[T1:%.*]] = load i64, i64* [[T0]], align 4
41 // CHECK-NEXT: call void (...) @_ZN5test13fooEz(i64 [[T1]])
42 // CHECK-NEXT: ret void