// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s namespace std { struct A { A(); }; // CHECK: define void @_ZNSt1AC1Ev // CHECK: define void @_ZNSt1AC2Ev A::A() { } }; namespace std { template struct allocator { }; } // CHECK: define void @_Z1fSaIcESaIiE void f(std::allocator, std::allocator) { } namespace std { template struct basic_string { }; } // CHECK: define void @_Z1fSbIcciE void f(std::basic_string) { } namespace std { template struct char_traits { }; typedef std::basic_string, std::allocator > string; } // CHECK: _Z1fSs void f(std::string) { } namespace std { template struct basic_istream { }; template struct basic_ostream { }; template struct basic_iostream { }; } // CHECK: _Z1fSi void f(std::basic_istream >) { } // CHECK: _Z1fSo void f(std::basic_ostream >) { } // CHECK: _Z1fSd void f(std::basic_iostream >) { } extern "C++" { namespace std { typedef void (*terminate_handler) (); // CHECK: _ZSt13set_terminatePFvvE terminate_handler set_terminate(terminate_handler) { return 0; } } } // Make sure we don't treat the following like std::string // CHECK: define void @_Z1f12basic_stringIcSt11char_traitsIcESaIcEE template struct basic_string { }; typedef basic_string, std::allocator > not_string; void f(not_string) { }