
This patch works towards consolidating all Clang debug-info into the `clang/test/DebugInfo` directory (https://discourse.llvm.org/t/clang-test-location-of-clang-debug-info-tests/87958). Here we move only the `clang/test/CodeGen` tests. The list of files i came up with is: 1. searched for anything with `*debug-info*` in the filename 2. searched for occurrences of `debug-info-kind` in the tests I created a couple of subdirectories in `clang/test/DebugInfo` where I thought it made sense (mostly when the tests were target-specific). There's a couple of tests in `clang/test/CodeGen` that still set `-debug-info-kind`. They probably don't need to do that, but I'm not changing that as part of this PR.
34 lines
863 B
C
34 lines
863 B
C
// RUN: %clang_cc1 %s -debug-info-kind=line-tables-only -emit-llvm -o - | FileCheck %s
|
|
// RUN: %clang_cc1 %s -debug-info-kind=line-directives-only -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_variable
|
|
int global = 42;
|
|
|
|
// CHECK-NOT: DW_TAG_typedef
|
|
// CHECK-NOT: DW_TAG_const_type
|
|
// CHECK-NOT: DW_TAG_pointer_type
|
|
// CHECK-NOT: DW_TAG_array_type
|
|
typedef const char* constCharPtrArray[10];
|
|
|
|
// CHECK-NOT: DW_TAG_structure_type
|
|
struct S {
|
|
// CHECK-NOT: DW_TAG_member
|
|
char a;
|
|
double b;
|
|
constCharPtrArray c;
|
|
};
|
|
|
|
// CHECK-NOT: DW_TAG_enumerator
|
|
// CHECK-NOT: DW_TAG_enumeration_type
|
|
enum E { ZERO = 0, ONE = 1 };
|
|
|
|
// CHECK-NOT: DILocalVariable
|
|
int sum(int p, int q) {
|
|
int r = p + q;
|
|
struct S s;
|
|
enum E e;
|
|
return r;
|
|
}
|