1 // RUN: %clang -emit-llvm -S -g %s -o - | FileCheck %s
2
3 // There are no lexical blocks, but we need two DILexicalBlockFiles to
4 // correctly represent file info.
5
foo(void)6 int foo(void) {
7 int i = 1;
8 # 4 "m.c"
9 # 1 "m.h" 1
10 int j = 2;
11 # 2 "m.h"
12 # 5 "m.c" 2
13 return i + j;
14 }
15
16 // CHECK-NOT: !DILexicalBlock
17 // 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: !DILexicalBlock
22