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