1 // RUN: %clang_cc1 %s -debug-info-kind=line-tables-only -S -emit-llvm -o - | FileCheck %s
2 // Checks that clang with "-gline-tables-only" doesn't emit debug info
3 // for variables and types.
4
5 // CHECK-NOT: DW_TAG_variable
6 int global = 42;
7
8 // CHECK-NOT: DW_TAG_typedef
9 // CHECK-NOT: DW_TAG_const_type
10 // CHECK-NOT: DW_TAG_pointer_type
11 // CHECK-NOT: DW_TAG_array_type
12 typedef const char* constCharPtrArray[10];
13
14 // CHECK-NOT: DW_TAG_structure_type
15 struct S {
16 // CHECK-NOT: DW_TAG_member
17 char a;
18 double b;
19 constCharPtrArray c;
20 };
21
22 // CHECK-NOT: DW_TAG_enumerator
23 // CHECK-NOT: DW_TAG_enumeration_type
24 enum E { ZERO = 0, ONE = 1 };
25
26 // CHECK-NOT: DILocalVariable
sum(int p,int q)27 int sum(int p, int q) {
28 int r = p + q;
29 struct S s;
30 enum E e;
31 return r;
32 }
33