Debian Codegraph @

clang/test/DebugInfo/Generic/2010-02-16-DbgScopes.c

raw
1 // RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited < %s | FileCheck %s
2 // Test to check number of lexical scope identified in debug info.
3 // CHECK: !DILexicalBlock(
4 // CHECK: !DILexicalBlock(
5 // CHECK: !DILexicalBlock(
6 // CHECK: !DILexicalBlock(
7
8 extern int bar(void);
9 extern void foobar(void);
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 }