summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/thunks.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-05-26 22:34:26 +0000
committerJohn McCall <rjmccall@apple.com>2010-05-26 22:34:26 +0000
commit23f6626262895d5307e2398e3377dc38c978ea43 (patch)
tree8b1567291e5ed1bd2a79b4c5958a02582a651293 /clang/test/CodeGenCXX/thunks.cpp
parent084bcb1322e5e8f5e71bd2e8eab1ae541e9aeaff (diff)
downloadbcm5719-llvm-23f6626262895d5307e2398e3377dc38c978ea43.tar.gz
bcm5719-llvm-23f6626262895d5307e2398e3377dc38c978ea43.zip
Correctly pass aggregates by reference when emitting thunks.
llvm-svn: 104778
Diffstat (limited to 'clang/test/CodeGenCXX/thunks.cpp')
-rw-r--r--clang/test/CodeGenCXX/thunks.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/thunks.cpp b/clang/test/CodeGenCXX/thunks.cpp
index b6e18e6e01f..79ca709f470 100644
--- a/clang/test/CodeGenCXX/thunks.cpp
+++ b/clang/test/CodeGenCXX/thunks.cpp
@@ -218,6 +218,24 @@ namespace Test7 {
void testD() { D d; }
}
+namespace Test8 {
+ struct NonPOD { ~NonPOD(); int x, y, z; };
+ struct A { virtual void foo(); };
+ struct B { virtual void bar(NonPOD); };
+ struct C : A, B { virtual void bar(NonPOD); static void helper(NonPOD); };
+
+ // CHECK: define void @_ZN5Test81C6helperENS_6NonPODE([[NONPODTYPE:%.*]]*
+ void C::helper(NonPOD var) {}
+
+ // CHECK: define void @_ZThn8_N5Test81C3barENS_6NonPODE(
+ // CHECK-NOT: load [[NONPODTYPE]]*
+ // CHECK-NOT: memcpy
+ // CHECK: ret void
+ void C::bar(NonPOD var) {}
+}
+
+/**** The following has to go at the end of the file ****/
+
// This is from Test5:
// CHECK: define linkonce_odr void @_ZTv0_n24_N5Test51B1fEv
// CHECK: define internal void @_ZThn8_N12_GLOBAL__N_11C1fEv(
OpenPOWER on IntegriCloud