diff options
author | Julian Büning <julian.buening@rwth-aachen.de> | 2020-06-01 16:41:40 +0200 |
---|---|---|
committer | MartinNowack <2443641+MartinNowack@users.noreply.github.com> | 2020-10-12 11:19:24 +0100 |
commit | e94d9c6268cb75ff317a42e26f33c419e6686b5d (patch) | |
tree | 346d23eac905484f73bebca6445313ef46a7ae37 | |
parent | 20d08cbef08993340d15855941fa7fe2c86d9f59 (diff) | |
download | klee-e94d9c6268cb75ff317a42e26f33c419e6686b5d.tar.gz |
fix cxa_exception include for older LLVM versions
-rw-r--r-- | runtime/klee-eh-cxx/klee_eh_cxx.cpp | 14 |
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 +} |