summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/debug-info-inline-for.c
blob: 55066b28a1ff4bc71c8291b8f280ef30b02ac707 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm -o - %s | FileCheck %s
// Check that clang emits Debug location in the phi instruction

int func(int n) {
  int a;
  for(a = 10; a>0 && n++; a--);
  return n;
}

// CHECK: land.end:
// CHECK-NEXT: {{.*}} = phi i1 {{.*}} !dbg ![[DbgLoc:[0-9]+]]

// CHECK: ![[DbgLoc]] = !DILocation(line: 0