
Add host exception support check utility flag. This is needed to not run tests that require exception support in few buildbots that lacks related symbols for some reason. Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D129242
14 lines
498 B
C++
14 lines
498 B
C++
// clang-format off
|
|
// REQUIRES: host-supports-jit, host-supports-exception
|
|
// UNSUPPORTED: system-aix
|
|
// XFAIL: arm, arm64-apple, windows-msvc, windows-gnu
|
|
// RUN: cat %s | clang-repl | FileCheck %s
|
|
extern "C" int printf(const char *, ...);
|
|
|
|
int f() { throw "Simple exception"; return 0; }
|
|
int checkException() { try { printf("Running f()\n"); f(); } catch (const char *e) { printf("%s\n", e); } return 0; }
|
|
auto r1 = checkException();
|
|
// CHECK: Running f()
|
|
// CHECK-NEXT: Simple exception
|
|
|
|
%quit |