blob: 36484a4c6372fd0ce94409768f4a7d1f73527ebc [file] [log] [blame]
David Blaikie75c12bf2013-01-24 22:47:48 +00001// RUN: %clang_cc1 -emit-llvm -g < %s | FileCheck %s
Devang Pateld19429f2010-02-16 21:41:20 +00002// Test to check number of lexical scope identified in debug info.
David Blaikie75c12bf2013-01-24 22:47:48 +00003// CHECK: DW_TAG_lexical_block
4// CHECK: DW_TAG_lexical_block
5// CHECK: DW_TAG_lexical_block
6// CHECK: DW_TAG_lexical_block
Devang Pateld19429f2010-02-16 21:41:20 +00007
8extern int bar();
9extern void foobar();
10void 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}