blob: 9e6e9714aa4742b459fcb281fe713d3062d1f82a [file] [log] [blame]
Eric Christopher73fb3502011-10-13 21:45:18 +00001// RUN: %clang -emit-llvm -S -g %s -o - | FileCheck %s
Devang Patel424a5c62010-09-15 20:50:40 +00002
3// Radar 8396182
Eric Christopher73fb3502011-10-13 21:45:18 +00004// There is only one lexical block, but we need a DILexicalBlock and two
5// DILexicalBlockFile to correctly represent file info. This means we have
6// two lexical blocks shown as the latter is also tagged as a lexical block.
Devang Patel424a5c62010-09-15 20:50:40 +00007
8int foo() {
9 int i = 1;
10# 4 "m.c"
11# 1 "m.h" 1
12 int j = 2;
13# 2 "m.h"
14# 5 "m.c" 2
15 return i + j;
16}
Eric Christopher73fb3502011-10-13 21:45:18 +000017
18// CHECK: DW_TAG_lexical_block
19// CHECK: DW_TAG_lexical_block
20// CHECK: !"m.h"
21// CHECK: DW_TAG_lexical_block
22// CHECK: !"m.c"
23// CHECK-NOT: DW_TAG_lexical_block