This reverts the following commits: 37ca7a795b277c20c02a218bf44052278c03344b 9aa6c72b92b6c89cc6d23b693257df9af7de2d15 705387c5074bcca36d626882462ebbc2bcc3bed4 8ca4b3ef19fe82d7ad6a6e1515317dcc01b41515 80dba72a669b5416e97a42fd2c2a7bc5a6d3f44a
30 lines
1.1 KiB
C++
30 lines
1.1 KiB
C++
// RUN: %clang_cc1 -fexceptions -fcxx-exceptions %s -triple=x86_64-pc-linux-gnu -funwind-tables=2 -emit-llvm -o - -O1 -disable-llvm-passes | FileCheck %s
|
|
|
|
// When generating the thunk for secondary, do not push terminate scopes for
|
|
// either the varargs or non-varargs case. Related to PR44987.
|
|
|
|
struct A {
|
|
virtual void primary_key();
|
|
};
|
|
struct B {
|
|
virtual void secondary();
|
|
virtual void secondary_vararg(int, ...);
|
|
};
|
|
class C : A, B {
|
|
virtual void primary_key();
|
|
void secondary() noexcept;
|
|
void secondary_vararg(int, ...) noexcept;
|
|
};
|
|
void C::primary_key() {}
|
|
|
|
// CHECK-LABEL: define available_externally void @_ZThn8_N1C9secondaryEv(%class.C* %this) {{.*}} #2
|
|
// CHECK-NOT: invoke
|
|
// CHECK: tail call void @_ZN1C9secondaryEv(%class.C* {{[^,]*}} %{{.*}})
|
|
// CHECK-NOT: invoke
|
|
// CHECK: ret void
|
|
|
|
// CHECK-LABEL: define available_externally void @_ZThn8_N1C16secondary_varargEiz(%class.C* %this, i32 %0, ...) {{.*}} #2
|
|
// CHECK-NOT: invoke
|
|
// CHECK: musttail call void (%class.C*, i32, ...) @_ZN1C16secondary_varargEiz(%class.C* {{[^,]*}} %{{.*}}, i32 %{{.*}}, ...) #3
|
|
// CHECK-NEXT: ret void
|