diff options
Diffstat (limited to 'test/CodeGenCXX')
-rw-r--r-- | test/CodeGenCXX/dllimport-rtti.cpp | 13 | ||||
-rw-r--r-- | test/CodeGenCXX/thunks.cpp | 17 |
2 files changed, 30 insertions, 0 deletions
diff --git a/test/CodeGenCXX/dllimport-rtti.cpp b/test/CodeGenCXX/dllimport-rtti.cpp index 8c0f863..6fe67da 100644 --- a/test/CodeGenCXX/dllimport-rtti.cpp +++ b/test/CodeGenCXX/dllimport-rtti.cpp @@ -15,3 +15,16 @@ struct __declspec(dllimport) S { struct U : S { } u; + +struct __declspec(dllimport) V { + virtual void f(); +} v; +// GNU-DAG: @_ZTV1V = external dllimport + +struct W { + __declspec(dllimport) virtual void f(); + virtual void g(); +} w; +// GNU-DAG: @_ZTV1W = linkonce_odr +// GNU-DAG: @_ZTS1W = linkonce_odr +// GNU-DAG: @_ZTI1W = linkonce_odr diff --git a/test/CodeGenCXX/thunks.cpp b/test/CodeGenCXX/thunks.cpp index 0e97255..38afb9d 100644 --- a/test/CodeGenCXX/thunks.cpp +++ b/test/CodeGenCXX/thunks.cpp @@ -361,6 +361,23 @@ namespace Test15 { // CHECK: declare void @_ZThn8_N6Test151C1fEiz } +namespace Test16 { +struct A { + virtual ~A(); +}; +struct B { + virtual void foo(); +}; +struct C : public A, public B { + void foo() {} +}; +struct D : public C { + ~D(); +}; +D::~D() {} +// CHECK: define linkonce_odr void @_ZThn8_N6Test161C3fooEv({{.*}}) {{.*}} comdat +} + /**** The following has to go at the end of the file ****/ // This is from Test5: |