1 // RUN: %clang_cc1 -triple aarch64-windows -ffreestanding -emit-llvm -O0 \ 2 // RUN: -x c++ -o - %s | FileCheck %s 3 4 struct pod { int a, b, c, d, e; }; 5 6 struct non_pod { 7 int a; 8 non_pod() {} 9 }; 10 11 struct pod s; 12 struct non_pod t; 13 14 struct pod bar() { return s; } 15 struct non_pod foo() { return t; } 16 // CHECK: define {{.*}} void @{{.*}}bar{{.*}}(%struct.pod* noalias sret %agg.result) 17 // CHECK: define {{.*}} void @{{.*}}foo{{.*}}(%struct.non_pod* noalias %agg.result) 18 19 20 // Check instance methods. 21 struct pod2 { int x; }; 22 struct Baz { pod2 baz(); }; 23 24 int qux() { return Baz().baz().x; } 25 // CHECK: declare {{.*}} void @{{.*}}baz@Baz{{.*}}(%struct.Baz*, %struct.pod2*) 26