1 // RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s
2 // RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 -fclang-abi-compat=19 | FileCheck %s --check-prefix=CHECK-CLANG-19
4 //CHECK: @_ZTCN16MangleCtorVTable4InstE0_NS_1A4ImplINS1_4WrapEEE
5 //CHECK-CLANG-19: @_ZTCN16MangleCtorVTable4InstE0_NS_1A4ImplINS0_4WrapEEE
9 // CHECK-LABEL: define{{.*}} void @_Z1f1XS_(
12 // CHECK-LABEL: define{{.*}} void @_Z1fR1XS0_(
15 // CHECK-LABEL: define{{.*}} void @_Z1fRK1XS1_(
16 void f(const X
&, const X
&) { }
21 // CHECK-LABEL: define{{.*}} void @_Z1fPFvvEM1SFvvE(
22 void f(T
*, T (S::*)) {}
29 // CHECK-LABEL: define{{.*}} void @_Z1fN1A1AENS_1BE(
30 void f(A::A a
, A::B b
) { }
36 // CHECK-LABEL: define{{.*}} void @_Z1fN1C1DERS_PS_S1_(
37 void f(C::D
, C
&, C
*, C
&) { }
44 template <typename T
> void f1(typename V
<T
>::U
, V
<T
>) { }
46 // CHECK: @_Z2f1IiEvN1VIT_E1UES2_
47 template void f1
<int>(int, V
<int>);
49 template <typename T
> void f2(V
<T
>, typename V
<T
>::U
) { }
51 // CHECK: @_Z2f2IiEv1VIT_ENS2_1UE
52 template void f2
<int>(V
<int>, int);
55 template <typename T
> struct S1
{};
56 template<typename T
> void ft3(S1
<T
>, S1
<char>) { }
58 // CHECK: @_ZN2NS3ft3IiEEvNS_2S1IT_EENS1_IcEE
59 template void ft3
<int>(S1
<int>, S1
<char>);
64 void f(const char*, const char*) {}
71 // CHECK: @_ZN2NS1fERNS_1CE
80 // CHECK: @_ZN5Test11fEMNS_1BEFvvENS_1AES3_
81 void f(void (B::*)(), A
, A
) { }
83 // CHECK: @_ZN5Test11fEMNS_1BEFvvENS_1AES3_MS0_FvS3_EMS3_FvvE
84 void f(void (B::*)(), A
, A
, void (B::*)(A
), void (A::*)()) { }
88 namespace ManglePrefix
{
98 typename X
<T
>::template Y
<T
>::type
f(typename X
<T
>::template Y
<T
>::type2
) { return 0; }
100 // CHECK: @_ZN12ManglePrefix1fIiEENS_1XIT_E1YIS2_E4typeENS5_5type2E
101 template int f
<int>(int);
104 namespace MangleCtorVTable
{
114 template <typename T
>
115 class Impl
: public virtual VBase
{
121 struct Inst
: public A::Impl
<A::Wrap
> {};
123 void Test() { Inst a
; }