Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / debug-info-variables.c
blob8ec60ff7c1d96f67de54790c468773bfa642fbcc
1 // RUN: %clang_cc1 %s -debug-info-kind=standalone -S -emit-llvm -o - | FileCheck %s
3 // CHECK: DIGlobalVariable(name: "global",{{.*}} line: [[@LINE+1]]
4 int global = 42;
6 // CHECK: DIGlobalVariable({{.*}}line: [[@LINE+4]],{{.*}} type: [[TYPEID:![0-9]+]]
7 // CHECK: [[TYPEID]] = !DICompositeType(tag: DW_TAG_array_type, baseType: [[BASETYPE:![0-9]+]]
8 // CHECK: [[BASETYPE]] = !DIBasicType(name: "char"
9 const char* s() {
10 return "1234567890";
13 // Note: Windows has `q -> p -> r` ordering and Linux has `p -> q -> r`.
14 // CHECK-DAG: DILocalVariable(name: "p"
15 // CHECK-DAG: DILocalVariable(name: "q"
16 // CHECK-DAG: DILocalVariable(name: "r"
17 int sum(int p, int q) {
18 int r = p + q;
19 return r;