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