xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCXX/debug-info-vtable-optzn.cpp (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1 // RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s
2 // RUN: %clang_cc1 -emit-llvm -g -triple amd64-unknown-freebsd %s -o - | FileCheck %s
3 //
4 // This tests that the "emit debug info for a C++ class only in the
5 // module that has its vtable" optimization is disabled by default on
6 // Darwin and FreeBSD.
7 //
8 // CHECK: [ DW_TAG_member ] [lost]
9 class A
10 {
11   virtual bool f() = 0;
12   int lost;
13 };
14 
15 class B : public A
16 {
17   B *g();
18 };
19 
g()20 B *B::g() {
21   return this;
22 }
23