blob: 6a81c6d04b36600084b624421400103850d5e56a [file] [log] [blame]
Anders Carlssone7c8cb62009-09-26 20:53:44 +00001// RUN: clang-cc -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s
2
3namespace std {
4 struct A { A(); };
5
6 // CHECK: define void @_ZNSt1AC1Ev
7 // CHECK: define void @_ZNSt1AC2Ev
8 A::A() { }
9};
Anders Carlsson8c031552009-09-26 23:10:05 +000010
11namespace std {
Anders Carlsson189d59c2009-09-26 23:14:39 +000012 template<typename T> struct allocator { };
Anders Carlsson8c031552009-09-26 23:10:05 +000013}
14
Anders Carlsson8c031552009-09-26 23:10:05 +000015// CHECK: define void @_Z1fSaIcESaIiE
Anders Carlssonfcd00292009-09-29 05:36:21 +000016void f(std::allocator<char>, std::allocator<int>) { }
Anders Carlsson189d59c2009-09-26 23:14:39 +000017
18namespace std {
Anders Carlssonf514b542009-09-27 00:12:57 +000019 template<typename T, typename U, typename V> struct basic_string { };
Anders Carlsson189d59c2009-09-26 23:14:39 +000020}
21
Anders Carlssonf514b542009-09-27 00:12:57 +000022// CHECK: define void @_Z1fSbIcciE
Anders Carlssonfcd00292009-09-29 05:36:21 +000023void f(std::basic_string<char, char, int>) { }
Anders Carlssonf514b542009-09-27 00:12:57 +000024
25namespace std {
26 template<typename T> struct char_traits { };
27
28 typedef std::basic_string<char, std::char_traits<char>, std::allocator<char> > string;
29}
30
31// CHECK: _Z1fSs
32void f(std::string) { }