brintos

brintos / llvm-project-archived public Read only

0
0
Text · 788 B · bc4dfdb Raw
51 lines · plain
1// RUN: %clang -fexceptions -fobjc-exceptions -S -emit-llvm  %s -o /dev/null2 3@interface Object {4@public5     Class isa;6}7+initialize;8+alloc;9+new;10+free;11-free;12+(Class)class;13-(Class)class;14-init;15-superclass;16-(const char *)name;17@end18 19@interface Frob: Object20@end21 22@implementation Frob: Object23@end24 25static Frob* _connection = ((void *)0);26 27extern void abort(void);28 29void test (Object* sendPort)30{31 int cleanupPorts = 1;32 Frob* receivePort = ((void *)0);33 34 @try {35  receivePort = (Frob *) -1;36  _connection = (Frob *) -1;37  receivePort = ((void *)0);38  sendPort = ((void *)0);39  cleanupPorts = 0;40  @throw [Object new];41 }42 @catch(Frob *obj) {43  if(!(0)) abort();44 }45 @catch(id exc) {46  if(!(!receivePort)) abort();47  if(!(!sendPort)) abort();48  if(!(!cleanupPorts)) abort();49 }50}51