This reapplies 4f0325873fa (and follow up patches 26fc07d5d88, a001cc0e6cdc, c9bc242e387, and fd174f0ff3e), which were reverted in 212cdc9a377 to investigate bot failures (e.g. https://lab.llvm.org/buildbot/#/builders/108/builds/8502) The fix to address the bot failures was landed in d0052ebbe2e. This patch also restricts construction of the UnwindInfoManager object to Apple platforms (as it won't be used on other platforms).
20 lines
660 B
C++
20 lines
660 B
C++
// clang-format off
|
|
// UNSUPPORTED: system-aix
|
|
// XFAIL for arm, or running on Windows.
|
|
// XFAIL: target=arm-{{.*}}, target=armv{{.*}}, system-windows
|
|
// RUN: cat %s | clang-repl | FileCheck %s
|
|
|
|
// Incompatible with msan. It passes with -O3 but fail -Oz. Interpreter
|
|
// generates non-instrumented code, which may call back to instrumented.
|
|
// UNSUPPORTED: msan
|
|
|
|
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
|