34 lines · c
1// RUN: %clang_cc1 %s -debug-info-kind=line-tables-only -emit-llvm -o - | FileCheck %s2// RUN: %clang_cc1 %s -debug-info-kind=line-directives-only -emit-llvm -o - | FileCheck %s3// Checks that clang with "-gline-tables-only" or "-gline-directives-only" doesn't emit debug info4// for variables and types.5 6// CHECK-NOT: DW_TAG_variable7int global = 42;8 9// CHECK-NOT: DW_TAG_typedef10// CHECK-NOT: DW_TAG_const_type11// CHECK-NOT: DW_TAG_pointer_type12// CHECK-NOT: DW_TAG_array_type13typedef const char* constCharPtrArray[10];14 15// CHECK-NOT: DW_TAG_structure_type16struct S {17 // CHECK-NOT: DW_TAG_member18 char a;19 double b;20 constCharPtrArray c;21};22 23// CHECK-NOT: DW_TAG_enumerator24// CHECK-NOT: DW_TAG_enumeration_type25enum E { ZERO = 0, ONE = 1 };26 27// CHECK-NOT: DILocalVariable28int sum(int p, int q) {29 int r = p + q;30 struct S s;31 enum E e;32 return r;33}34