Eric Christopher | 73fb350 | 2011-10-13 21:45:18 +0000 | [diff] [blame] | 1 | // RUN: %clang -emit-llvm -S -g %s -o - | FileCheck %s |
Devang Patel | 424a5c6 | 2010-09-15 20:50:40 +0000 | [diff] [blame] | 2 | |
| 3 | // Radar 8396182 |
David Blaikie | a650485 | 2013-01-26 22:16:26 +0000 | [diff] [blame] | 4 | // There are no lexical blocks, but we need two DILexicalBlockFiles to |
| 5 | // correctly represent file info. |
Devang Patel | 424a5c6 | 2010-09-15 20:50:40 +0000 | [diff] [blame] | 6 | |
| 7 | int foo() { |
| 8 | int i = 1; |
| 9 | # 4 "m.c" |
| 10 | # 1 "m.h" 1 |
| 11 | int j = 2; |
| 12 | # 2 "m.h" |
| 13 | # 5 "m.c" 2 |
| 14 | return i + j; |
| 15 | } |
Eric Christopher | 73fb350 | 2011-10-13 21:45:18 +0000 | [diff] [blame] | 16 | |
| 17 | // CHECK: DW_TAG_lexical_block |
Eric Christopher | 73fb350 | 2011-10-13 21:45:18 +0000 | [diff] [blame] | 18 | // CHECK: !"m.h" |
| 19 | // CHECK: DW_TAG_lexical_block |
| 20 | // CHECK: !"m.c" |
| 21 | // CHECK-NOT: DW_TAG_lexical_block |