diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2014-05-11 18:26:10 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2014-05-11 18:26:10 +0000 |
| commit | f73d5f23a889b93d89ddef61ac0995df40286bb8 (patch) | |
| tree | c89fa0adefb99f464eba263b447f84c2ceb663ce /test/CodeGenCXX | |
| parent | 33fa48314f06936f83859852feb3c0ce68b08c0c (diff) | |
Notes
Diffstat (limited to 'test/CodeGenCXX')
| -rw-r--r-- | test/CodeGenCXX/ctor-dtor-alias.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/test/CodeGenCXX/ctor-dtor-alias.cpp b/test/CodeGenCXX/ctor-dtor-alias.cpp index 235d1650dec9..d8d1fab7cef3 100644 --- a/test/CodeGenCXX/ctor-dtor-alias.cpp +++ b/test/CodeGenCXX/ctor-dtor-alias.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 %s -triple x86_64-linux -emit-llvm -o - -mconstructor-aliases -O1 -disable-llvm-optzns | FileCheck %s -// RUN: %clang_cc1 %s -triple x86_64-linux -emit-llvm -o - -mconstructor-aliases | FileCheck --check-prefix=NOOPT %s +// RUN: %clang_cc1 %s -triple i686-linux -emit-llvm -o - -mconstructor-aliases -O1 -disable-llvm-optzns | FileCheck %s +// RUN: %clang_cc1 %s -triple i686-linux -emit-llvm -o - -mconstructor-aliases | FileCheck --check-prefix=NOOPT %s // RUN: %clang_cc1 -cc1 -triple x86_64--netbsd -emit-llvm \ // RUN: -mconstructor-aliases -O2 %s -o - | FileCheck --check-prefix=CHECK-RAUW %s @@ -133,6 +133,22 @@ namespace test8 { zed foo; } +namespace test9 { +struct foo { + __attribute__((stdcall)) ~foo() { + } +}; + +struct bar : public foo {}; + +void zed() { + // Test that we produce a call to bar's destructor. We used to call foo's, but + // it has a different calling conversion. + // CHECK-DAG: call void @_ZN5test93barD2Ev + bar ptr; +} +} + // CHECK-RAUW: @_ZTV1C = linkonce_odr unnamed_addr constant [4 x i8*] [{{[^@]*}}@_ZTI1C {{[^@]*}}@_ZN1CD2Ev {{[^@]*}}@_ZN1CD0Ev {{[^@]*}}] // r194296 replaced C::~C with B::~B without emitting the later. |
