xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/2010-02-16-DbgScopes.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1 // RUN: %clang_cc1 -emit-llvm -g < %s | FileCheck %s
2 // Test to check number of lexical scope identified in debug info.
3 // CHECK: DW_TAG_lexical_block
4 // CHECK: DW_TAG_lexical_block
5 // CHECK: DW_TAG_lexical_block
6 // CHECK: DW_TAG_lexical_block
7 
8 extern int bar();
9 extern void foobar();
foo(int s)10 void foo(int s) {
11   unsigned loc = 0;
12   if (s) {
13     if (bar()) {
14       foobar();
15     }
16   } else {
17     loc = 1;
18     if (bar()) {
19       loc = 2;
20     }
21   }
22 }
23