diff options
Diffstat (limited to 'test/CodeGen/arm64-microsoft-arguments.cpp')
-rw-r--r-- | test/CodeGen/arm64-microsoft-arguments.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/CodeGen/arm64-microsoft-arguments.cpp b/test/CodeGen/arm64-microsoft-arguments.cpp new file mode 100644 index 0000000000000..3ef468880ad76 --- /dev/null +++ b/test/CodeGen/arm64-microsoft-arguments.cpp @@ -0,0 +1,25 @@ +// RUN: %clang_cc1 -triple aarch64-windows -ffreestanding -emit-llvm -O0 \ +// RUN: -x c++ -o - %s | FileCheck %s + +struct pod { int a, b, c, d, e; }; + +struct non_pod { + int a; + non_pod() {} +}; + +struct pod s; +struct non_pod t; + +struct pod bar() { return s; } +struct non_pod foo() { return t; } +// CHECK: define {{.*}} void @{{.*}}bar{{.*}}(%struct.pod* noalias sret %agg.result) +// CHECK: define {{.*}} void @{{.*}}foo{{.*}}(%struct.non_pod* noalias %agg.result) + + +// Check instance methods. +struct pod2 { int x; }; +struct Baz { pod2 baz(); }; + +int qux() { return Baz().baz().x; } +// CHECK: declare {{.*}} void @{{.*}}baz@Baz{{.*}}(%struct.Baz*, %struct.pod2*) |