1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fcxx-exceptions -fexceptions -emit-llvm -g -triple x86_64-apple-darwin10 %s -o - | FileCheck %s 2*f4a2713aSLionel Sambuc // The landing pad should have the line number of the closing brace of the function. 3*f4a2713aSLionel Sambuc // rdar://problem/13888152 4*f4a2713aSLionel Sambuc // CHECK: ret i32 5*f4a2713aSLionel Sambuc // CHECK: landingpad {{.*}} 6*f4a2713aSLionel Sambuc // CHECK-NEXT: !dbg ![[LPAD:[0-9]+]] 7*f4a2713aSLionel Sambuc // CHECK: ![[LPAD]] = metadata !{i32 24, i32 0, metadata !{{.*}}, null} 8*f4a2713aSLionel Sambuc 9*f4a2713aSLionel Sambuc # 1 "/usr/include/c++/4.2.1/vector" 1 3 10*f4a2713aSLionel Sambuc typedef long unsigned int __darwin_size_t; 11*f4a2713aSLionel Sambuc typedef __darwin_size_t size_t; 12*f4a2713aSLionel Sambuc namespace std { 13*f4a2713aSLionel Sambuc template<typename _Tp> 14*f4a2713aSLionel Sambuc class allocator 15*f4a2713aSLionel Sambuc { 16*f4a2713aSLionel Sambuc public: 17*f4a2713aSLionel Sambuc template<typename _Tp1> 18*f4a2713aSLionel Sambuc struct rebind 19*f4a2713aSLionel Sambuc { typedef allocator<_Tp1> other; }; 20*f4a2713aSLionel Sambuc ~allocator() throw() { } 21*f4a2713aSLionel Sambuc }; 22*f4a2713aSLionel Sambuc template<typename _Tp, typename _Alloc> 23*f4a2713aSLionel Sambuc struct _Vector_base 24*f4a2713aSLionel Sambuc { 25*f4a2713aSLionel Sambuc typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; 26*f4a2713aSLionel Sambuc struct _Vector_impl 27*f4a2713aSLionel Sambuc { 28*f4a2713aSLionel Sambuc _Vector_impl(_Tp_alloc_type const& __a) { } 29*f4a2713aSLionel Sambuc }; 30*f4a2713aSLionel Sambuc typedef _Alloc allocator_type; 31*f4a2713aSLionel Sambuc _Vector_base(const allocator_type& __a) 32*f4a2713aSLionel Sambuc : _M_impl(__a) 33*f4a2713aSLionel Sambuc { } 34*f4a2713aSLionel Sambuc ~_Vector_base() { } 35*f4a2713aSLionel Sambuc _Vector_impl _M_impl; 36*f4a2713aSLionel Sambuc }; 37*f4a2713aSLionel Sambuc template<typename _Tp, typename _Alloc = std::allocator<_Tp> > 38*f4a2713aSLionel Sambuc class vector 39*f4a2713aSLionel Sambuc : protected _Vector_base<_Tp, _Alloc> 40*f4a2713aSLionel Sambuc { 41*f4a2713aSLionel Sambuc typedef _Vector_base<_Tp, _Alloc> _Base; 42*f4a2713aSLionel Sambuc public: 43*f4a2713aSLionel Sambuc typedef _Tp value_type; 44*f4a2713aSLionel Sambuc typedef size_t size_type; 45*f4a2713aSLionel Sambuc typedef _Alloc allocator_type; 46*f4a2713aSLionel Sambuc vector(const allocator_type& __a = allocator_type()) 47*f4a2713aSLionel Sambuc : _Base(__a) 48*f4a2713aSLionel Sambuc { } 49*f4a2713aSLionel Sambuc size_type 50*f4a2713aSLionel Sambuc push_back(const value_type& __x) 51*f4a2713aSLionel Sambuc {} 52*f4a2713aSLionel Sambuc }; 53*f4a2713aSLionel Sambuc } 54*f4a2713aSLionel Sambuc # 10 "main.cpp" 2 55*f4a2713aSLionel Sambuc 56*f4a2713aSLionel Sambuc 57*f4a2713aSLionel Sambuc 58*f4a2713aSLionel Sambuc 59*f4a2713aSLionel Sambuc int main (int argc, char const *argv[], char const *envp[]) 60*f4a2713aSLionel Sambuc { // 15 61*f4a2713aSLionel Sambuc std::vector<long> longs; 62*f4a2713aSLionel Sambuc std::vector<short> shorts; 63*f4a2713aSLionel Sambuc for (int i=0; i<12; i++) 64*f4a2713aSLionel Sambuc { 65*f4a2713aSLionel Sambuc longs.push_back(i); 66*f4a2713aSLionel Sambuc shorts.push_back(i); 67*f4a2713aSLionel Sambuc } 68*f4a2713aSLionel Sambuc return 0; // 23 69*f4a2713aSLionel Sambuc } // 24 70