1 // RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s
5 // CHECK-LABEL: define{{.*}} void @_Z1f1XS_(
8 // CHECK-LABEL: define{{.*}} void @_Z1fR1XS0_(
11 // CHECK-LABEL: define{{.*}} void @_Z1fRK1XS1_(
12 void f(const X
&, const X
&) { }
17 // CHECK-LABEL: define{{.*}} void @_Z1fPFvvEM1SFvvE(
18 void f(T
*, T (S::*)) {}
25 // CHECK-LABEL: define{{.*}} void @_Z1fN1A1AENS_1BE(
26 void f(A::A a
, A::B b
) { }
32 // CHECK-LABEL: define{{.*}} void @_Z1fN1C1DERS_PS_S1_(
33 void f(C::D
, C
&, C
*, C
&) { }
40 template <typename T
> void f1(typename V
<T
>::U
, V
<T
>) { }
42 // CHECK: @_Z2f1IiEvN1VIT_E1UES2_
43 template void f1
<int>(int, V
<int>);
45 template <typename T
> void f2(V
<T
>, typename V
<T
>::U
) { }
47 // CHECK: @_Z2f2IiEv1VIT_ENS2_1UE
48 template void f2
<int>(V
<int>, int);
51 template <typename T
> struct S1
{};
52 template<typename T
> void ft3(S1
<T
>, S1
<char>) { }
54 // CHECK: @_ZN2NS3ft3IiEEvNS_2S1IT_EENS1_IcEE
55 template void ft3
<int>(S1
<int>, S1
<char>);
60 void f(const char*, const char*) {}
67 // CHECK: @_ZN2NS1fERNS_1CE
76 // CHECK: @_ZN5Test11fEMNS_1BEFvvENS_1AES3_
77 void f(void (B::*)(), A
, A
) { }
79 // CHECK: @_ZN5Test11fEMNS_1BEFvvENS_1AES3_MS0_FvS3_EMS3_FvvE
80 void f(void (B::*)(), A
, A
, void (B::*)(A
), void (A::*)()) { }
84 namespace ManglePrefix
{
94 typename X
<T
>::template Y
<T
>::type
f(typename X
<T
>::template Y
<T
>::type2
) { return 0; }
96 // CHECK: @_ZN12ManglePrefix1fIiEENS_1XIT_E1YIS2_E4typeENS5_5type2E
97 template int f
<int>(int);