llvm-project/clang/test/CodeGenCXX/debug-info-gline-tables-only.cpp
Alexey Bataev 80e1b5eb34 [DEBUGINFO] Add support for emission of the debug directives only.
Summary:
Added option -gline-directives-only to support emission of the debug directives
only. It behaves very similar to -gline-tables-only, except that it sets
llvm debug info emission kind to
llvm::DICompileUnit::DebugDirectivesOnly.

Reviewers: echristo

Subscribers: aprantl, fedor.sergeev, JDevlieghere, cfe-commits

Differential Revision: https://reviews.llvm.org/D51177

llvm-svn: 341212
2018-08-31 13:56:14 +00:00

31 lines
737 B
C++

// RUN: %clang_cc1 %s -fno-rtti -debug-info-kind=line-tables-only -S -emit-llvm -o - | FileCheck %s
// RUN: %clang_cc1 %s -fno-rtti -debug-info-kind=line-directives-only -S -emit-llvm -o - | FileCheck %s
// Checks that clang with "-gline-tables-only" or "-gline-directives-only" doesn't emit debug info
// for variables and types.
// CHECK-NOT: DW_TAG_namespace
namespace NS {
// CHECK-NOT: DW_TAG_class_type
// CHECK-NOT: DW_TAG_friend
class C { friend class D; };
class D {};
// CHECK-NOT: DW_TAG_inheritance
class E : public C {
// CHECK-NOT: DW_TAG_reference type
void x(const D& d);
};
struct F {
enum X { };
void func(X);
virtual ~F();
};
F::~F() {
}
}
// CHECK-NOT: DW_TAG_variable
NS::C c;
NS::D d;
NS::E e;
NS::F f;