Alexey Samsonov | fd00eec | 2012-05-04 07:39:27 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -gline-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: DW_TAG_arg_variable |
| 27 | int sum(int p, int q) { |
| 28 | // CHECK-NOT: DW_TAG_auto_variable |
| 29 | int r = p + q; |
| 30 | struct S s; |
| 31 | enum E e; |
| 32 | return r; |
| 33 | } |