brintos

brintos / llvm-project-archived public Read only

0
0
Text · 577 B · e25793c Raw
26 lines · plain
1// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -fobjc-exceptions %s -o - | FileCheck %s2 3 4extern int printf(const char*, ...);5 6int main(void)7{8    @try {9        @throw @"foo";10    } @catch (id e) {11        @try {12// CHECK: call void @objc_exception_throw13           @throw;14        } @catch (id e) {15            if (e) {16                printf("caught \n");17            } else {18                printf("caught (WRONG)\n");19            }20        } @catch (...) {21            printf("caught nothing (WRONG)\n");22        }23    }24}25 26