brintos

brintos / llvm-project-archived public Read only

0
0
Text · 931 B · 0a93388 Raw
51 lines · plain
1// RUN: %clang_cc1 -triple i386-apple-macosx10.6.6 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -fobjc-exceptions -fcxx-exceptions -fexceptions -o - %s | FileCheck %s2 3@interface ns_array4+ (id) array;5@end6 7@implementation ns_array8+ (id) array { return 0; }9@end10 11id Groups();12 13@protocol P @end;14 15@interface INTF<P> {16    double dd;17}18@end19 20id FUNC() {21    id groups;22    try23    {24      groups = Groups();  // throws on errors.25    }26    catch( INTF<P>* error )27    {28      Groups();29    }30    catch( id error )31    { 32      // CHECK:      landingpad { ptr, i32 }33      // CHECK-NEXT:   catch ptr @_ZTIPU11objcproto1P4INTF34      // CHECK-NEXT:   catch ptr @_ZTIP11objc_object35      // CHECK-NEXT:   catch ptr @_ZTIP10objc_class36      error = error; 37      groups = [ns_array array]; 38    }39    catch (Class cl) {40      cl = cl;41      groups = [ns_array array];42    }43    return groups;44 45}46 47int main() {48  FUNC();49  return 0;50}51