summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/x86_32-arguments.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2010-01-27 03:22:55 +0000
committerAnders Carlsson <andersca@mac.com>2010-01-27 03:22:55 +0000
commitbfc008d5970b5bff0fd3ec15ecbd5b46f56fd9a1 (patch)
treedd165a7631c534c2e13e7dfde3f0d1e1a5bcd98e /test/CodeGenCXX/x86_32-arguments.cpp
parent798345c69505226a33258177fa6e06275ef59595 (diff)
Update xcode project.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94654 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/x86_32-arguments.cpp')
-rw-r--r--test/CodeGenCXX/x86_32-arguments.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/CodeGenCXX/x86_32-arguments.cpp b/test/CodeGenCXX/x86_32-arguments.cpp
new file mode 100644
index 0000000000..d13c0e4888
--- /dev/null
+++ b/test/CodeGenCXX/x86_32-arguments.cpp
@@ -0,0 +1,24 @@
+// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck %s
+
+// Non-trivial dtors, should both be passed indirectly.
+struct S {
+ ~S();
+ int s;
+};
+
+// CHECK: define void @_Z1fv(%struct.S* noalias sret %
+S f() { return S(); }
+// CHECK: define void @_Z1f1S(%struct.S*)
+void f(S) { }
+
+// Non-trivial dtors, should both be passed indirectly.
+class C {
+ ~C();
+ double c;
+};
+
+// CHECK: define void @_Z1gv(%class.C* noalias sret %
+C g() { return C(); }
+
+// CHECK: define void @_Z1f1C(%class.C*)
+void f(C) { }