22 lines · c
1// RUN: %clang -emit-llvm -S -g %s -o - | FileCheck %s2 3// There are no lexical blocks, but we need two DILexicalBlockFiles to4// correctly represent file info.5 6int foo(void) {7 int i = 1;8# 4 "m.c"9# 1 "m.h" 110 int j = 2;11# 2 "m.h"12# 5 "m.c" 213 return i + j;14}15 16// CHECK-NOT: !DILexicalBlock17// CHECK: !DILexicalBlockFile({{.*}}file: ![[MH:[0-9]+]]18// CHECK: !DIFile(filename: "m.h"19// CHECK: !DILexicalBlockFile({{.*}}file: ![[MC:[0-9]+]]20// CHECK: !DIFile(filename: "m.c"21// CHECK-NOT: !DILexicalBlock22