summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/type-metadata-memfun.cpp
blob: 2ff574e7da427877bee2f823f45a7045387818c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// RUN: %clang_cc1 -flto -flto-unit -triple x86_64-unknown-linux -fvisibility hidden -emit-llvm -o - %s | FileCheck %s

struct S1 {
  S1();
  ~S1();
  virtual void vf();
  void f();
  void fdecl();
};

struct [[clang::lto_visibility_public]] S2 {
  void f();
};

// CHECK-NOT: declare{{.*}}!type
// CHECK-NOT: define{{.*}}!type

S1::S1() {}
S1::~S1() {}
void S1::vf() {}
// CHECK: define hidden void @_ZN2S11fEv{{.*}} !type [[S2F:![0-9]+]]
void S1::f() {
  fdecl();
}

void S2::f() {}

// CHECK-NOT: declare{{.*}}!type
// CHECK-NOT: define{{.*}}!type

// CHECK: [[S2F]] = !{i64 0, !"_ZTSM2S1FvvE"}