xref: /llvm-project/clang/test/CodeGen/2010-02-16-DbgScopes.c (revision 1ea584377e7897f7df5302ed9cd378d17be14fbf)
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);
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