1 // RUN: %clang_cc1 -triple x86_64-apple-macosx -std=c++11 -fvisibility hidden -emit-llvm -o - %s -O2 -disable-llvm-passes | FileCheck %s 2 // RUN: %clang_cc1 -triple x86_64-apple-macosx -DUNDEF_G -std=c++11 -fvisibility hidden -emit-llvm -o - %s -O2 -disable-llvm-passes | FileCheck %s 3 4 namespace std { 5 template <class> 6 class __attribute__((__type_visibility__("default"))) shared_ptr { 7 template <class> friend class shared_ptr; 8 }; 9 } 10 struct dict; 11 #ifndef UNDEF_G 12 std::shared_ptr<dict> g; 13 #endif 14 class __attribute__((visibility("default"))) Bar; 15 template <class = std::shared_ptr<Bar>> 16 class __attribute__((visibility("default"))) i { 17 std::shared_ptr<int> foo() const; 18 }; 19 20 // CHECK: define void @_ZNK1iISt10shared_ptrI3BarEE3fooEv foo() const21template <> std::shared_ptr<int> i<>::foo() const { 22 return std::shared_ptr<int>(); 23 } 24