Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenCXX / visibility-pr36810.cpp
blobecb2302299e8c0461139b75e00a08f61d77bfb71
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
4 namespace std {
5 template <class>
6 class __attribute__((__type_visibility__("default"))) shared_ptr {
7 template <class> friend class shared_ptr;
8 };
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;
20 // CHECK: define{{.*}} void @_ZNK1iISt10shared_ptrI3BarEE3fooEv
21 template <> std::shared_ptr<int> i<>::foo() const {
22 return std::shared_ptr<int>();