xref: /aosp_15_r20/external/clang/test/CodeGenObjC/catch-lexical-block.m (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li// RUN: %clang_cc1 -debug-info-kind=limited -fobjc-exceptions -emit-llvm %s -o - | FileCheck %s
2*67e74705SXin Li@interface Foo @end
3*67e74705SXin Livoid f0() {
4*67e74705SXin Li  @try {
5*67e74705SXin Li    @throw @"a";
6*67e74705SXin Li  } @catch(Foo *e) {
7*67e74705SXin Li  }
8*67e74705SXin Li}
9*67e74705SXin Li
10*67e74705SXin Li// We should have 3 lexical blocks here at the moment, including one
11*67e74705SXin Li// for the catch block.
12*67e74705SXin Li// CHECK: !DILexicalBlock(
13*67e74705SXin Li// CHECK: !DILocalVariable(
14*67e74705SXin Li// CHECK: !DILexicalBlock(
15*67e74705SXin Li// CHECK: !DILexicalBlock(
16