From e94d9c6268cb75ff317a42e26f33c419e6686b5d Mon Sep 17 00:00:00 2001 From: Julian Büning Date: Mon, 1 Jun 2020 16:41:40 +0200 Subject: fix cxa_exception include for older LLVM versions --- runtime/klee-eh-cxx/klee_eh_cxx.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'runtime/klee-eh-cxx') diff --git a/runtime/klee-eh-cxx/klee_eh_cxx.cpp b/runtime/klee-eh-cxx/klee_eh_cxx.cpp index 8eafac2c..5dec6050 100644 --- a/runtime/klee-eh-cxx/klee_eh_cxx.cpp +++ b/runtime/klee-eh-cxx/klee_eh_cxx.cpp @@ -9,7 +9,17 @@ #include // from libcxxabi -#include +#ifdef __has_include +# if __has_include() +# include // renamed with LLVM 10 +# elif __has_include() +# include +# else +# error "missing 'cxa_exception' header from libcxxabi" +# endif +#else +# include // assume old name +#endif #include // implemented in the SpecialFunctionHandler @@ -215,4 +225,4 @@ _Unwind_Ptr _Unwind_GetRegionStart(struct _Unwind_Context *context) { klee_report_error(__FILE__, __LINE__, "_Unwind_GetRegionStart not supported", "unsupported.err"); } -} \ No newline at end of file +} -- cgit 1.4.1