diff options
author | John McCall <rjmccall@apple.com> | 2010-05-26 22:34:26 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-05-26 22:34:26 +0000 |
commit | 2736071ea3a46f90e65c93418961611d96c10ab9 (patch) | |
tree | 02cc651ea6a90418c76fa7a7a7adf9b118faa73b /test/CodeGenCXX/thunks.cpp | |
parent | 12e131385e892e3723483a1081a89bcad29c8a84 (diff) |
Correctly pass aggregates by reference when emitting thunks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104778 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/thunks.cpp')
-rw-r--r-- | test/CodeGenCXX/thunks.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGenCXX/thunks.cpp b/test/CodeGenCXX/thunks.cpp index b6e18e6e01..79ca709f47 100644 --- a/test/CodeGenCXX/thunks.cpp +++ b/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( |