Clang Project

clang_source_code/test/CodeGenCXX/debug-info-gline-tables-only.cpp
1// RUN: %clang_cc1 %s -fno-rtti -debug-info-kind=line-tables-only -S -emit-llvm -o - | FileCheck %s
2// RUN: %clang_cc1 %s -fno-rtti -debug-info-kind=line-directives-only -S -emit-llvm -o - | FileCheck %s
3// Checks that clang with "-gline-tables-only" or "-gline-directives-only" doesn't emit debug info
4// for variables and types.
5
6// CHECK-NOT: DW_TAG_namespace
7namespace NS {
8// CHECK-NOT: DW_TAG_class_type
9// CHECK-NOT: DW_TAG_friend
10class C { friend class D; };
11class D {};
12// CHECK-NOT: DW_TAG_inheritance
13class E : public C {
14  // CHECK-NOT: DW_TAG_reference type
15  void x(const D& d);
16};
17struct F {
18  enum X { };
19  void func(X);
20  virtual ~F();
21};
22F::~F() {
23}
24}
25
26// CHECK-NOT: DW_TAG_variable
27NS::C c;
28NS::D d;
29NS::E e;
30NS::F f;
31