about summary refs log tree commit diff homepage
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/klee-eh-cxx/klee_eh_cxx.cpp14
1 files changed, 12 insertions, 2 deletions
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 <klee/klee.h>
 
 // from libcxxabi
-#include <cxa_exception.h>
+#ifdef __has_include
+#  if __has_include(<cxa_exception.h>)
+#    include <cxa_exception.h> // renamed with LLVM 10
+#  elif __has_include(<cxa_exception.hpp>)
+#    include <cxa_exception.hpp>
+#  else
+#    error "missing 'cxa_exception' header from libcxxabi"
+#  endif
+#else
+#  include <cxa_exception.hpp> // assume old name
+#endif
 #include <private_typeinfo.h>
 
 // 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
+}