From 3998ef54ce5a2d63be2a5763170a98d464d59762 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Sequoia Date: Sun, 18 Jan 2015 11:18:13 -0800 Subject: [PATCH] Define EXC_MASK_CRASH and MACH_EXCEPTION_CODES if they're not defined in the SDK The 10.4 SDK does not define these macros Signed-off-by: Jeremy Huddleston Sequoia --- llvm/lib/Support/Unix/Signals.inc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/llvm/lib/Support/Unix/Signals.inc b/llvm/lib/Support/Unix/Signals.inc index f68374d29f02..977058c089ab 100644 --- a/llvm/lib/Support/Unix/Signals.inc +++ b/llvm/lib/Support/Unix/Signals.inc @@ -635,6 +635,15 @@ void llvm::sys::PrintStackTraceOnErrorSignal(StringRef Argv0, AddSignalHandler(PrintStackTraceSignalHandler, nullptr); #if defined(__APPLE__) && ENABLE_CRASH_OVERRIDES + +/* These aren't defined in the 10.4 SDK, so provide them here */ +#ifndef EXC_MASK_CRASH +#define EXC_MASK_CRASH 0x400 +#endif +#ifndef MACH_EXCEPTION_CODES +#define MACH_EXCEPTION_CODES 0x80000000 +#endif + // Environment variable to disable any kind of crash dialog. if (DisableCrashReporting || getenv("LLVM_DISABLE_CRASH_REPORT")) { mach_port_t self = mach_task_self(); -- 2.37.2