| 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 | 
| Eric Christopher | 73fb350 | 2011-10-13 21:45:18 +0000 | [diff] [blame] | 4 | // 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 Patel | 424a5c6 | 2010-09-15 20:50:40 +0000 | [diff] [blame] | 7 |  | 
 | 8 | int 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 Christopher | 73fb350 | 2011-10-13 21:45:18 +0000 | [diff] [blame] | 17 |  | 
 | 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 |