[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGenCXX / type-metadata-memfun.cpp
blob764b1a3b72ba9ed5f06050b3471a317a02e4ae86
1 // RUN: %clang_cc1 -flto -flto-unit -triple x86_64-unknown-linux -fvisibility=hidden -emit-llvm -o - %s | FileCheck %s
3 struct S1 {
4 S1();
5 ~S1();
6 virtual void vf();
7 void f();
8 void fdecl();
9 };
11 struct [[clang::lto_visibility_public]] S2 {
12 void f();
15 // CHECK-NOT: declare{{.*}}!type
16 // CHECK-NOT: define{{.*}}!type
18 S1::S1() {}
19 S1::~S1() {}
20 void S1::vf() {}
21 // CHECK: define hidden void @_ZN2S11fEv{{.*}} !type [[S2F:![0-9]+]]
22 void S1::f() {
23 fdecl();
26 void S2::f() {}
28 // CHECK-NOT: declare{{.*}}!type
29 // CHECK-NOT: define{{.*}}!type
31 // CHECK: [[S2F]] = !{i64 0, !"_ZTSM2S1FvvE"}