1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -g %s -o - -fstandalone-debug | FileCheck %s
2*0a6a1f1dSLionel Sambuc namespace __pointer_type_imp
3*0a6a1f1dSLionel Sambuc {
4*0a6a1f1dSLionel Sambuc template <class _Tp, class _Dp, bool > struct __pointer_type1 {};
5*0a6a1f1dSLionel Sambuc
6*0a6a1f1dSLionel Sambuc // CHECK: ![[PARAMS:[0-9]+]], !"_ZTSN18__pointer_type_imp15__pointer_type1I1C14default_deleteIS1_ELb0EEE"} ; [ DW_TAG_structure_type ] [__pointer_type1<C, default_delete<C>, false>] [line [[@LINE+1]], size 8, align 8, offset 0] [def] [from ]
7*0a6a1f1dSLionel Sambuc template <class _Tp, class _Dp> struct __pointer_type1<_Tp, _Dp, false>
8*0a6a1f1dSLionel Sambuc {
9*0a6a1f1dSLionel Sambuc typedef _Tp* type;
10*0a6a1f1dSLionel Sambuc };
11*0a6a1f1dSLionel Sambuc }
12*0a6a1f1dSLionel Sambuc template <class _Tp, class _Dp>
13*0a6a1f1dSLionel Sambuc struct __pointer_type2
14*0a6a1f1dSLionel Sambuc {
15*0a6a1f1dSLionel Sambuc // Test that the bool template type parameter is emitted.
16*0a6a1f1dSLionel Sambuc //
17*0a6a1f1dSLionel Sambuc // CHECK: ![[PARAMS]] = !{!{{.*}}, !{{.*}}, ![[FALSE:[0-9]+]]}
18*0a6a1f1dSLionel Sambuc // CHECK: ![[FALSE]] = {{.*}} i8 0, {{.*}}} ; [ DW_TAG_template_value_parameter ]
19*0a6a1f1dSLionel Sambuc typedef typename __pointer_type_imp::__pointer_type1<_Tp, _Dp, false>::type type;
20*0a6a1f1dSLionel Sambuc };
21*0a6a1f1dSLionel Sambuc template <class _Tp> struct default_delete {};
22*0a6a1f1dSLionel Sambuc template <class _Tp, class _Dp = default_delete<_Tp> > class unique_ptr
23*0a6a1f1dSLionel Sambuc {
24*0a6a1f1dSLionel Sambuc typedef typename __pointer_type2<_Tp, _Dp>::type pointer;
unique_ptr(pointer __p,_Dp __d)25*0a6a1f1dSLionel Sambuc unique_ptr(pointer __p, _Dp __d) {}
26*0a6a1f1dSLionel Sambuc };
27*0a6a1f1dSLionel Sambuc class C {
28*0a6a1f1dSLionel Sambuc unique_ptr<C> Ptr;
29*0a6a1f1dSLionel Sambuc };
foo(C & c)30*0a6a1f1dSLionel Sambuc void foo(C &c) {
31*0a6a1f1dSLionel Sambuc }
32