about summary refs log tree commit diff homepage
path: root/include
diff options
context:
space:
mode:
authorRichard Trembecký <richardt@centrum.sk>2016-04-28 18:27:24 +0200
committerCristian Cadar <c.cadar@imperial.ac.uk>2018-05-24 14:08:27 +0100
commit870f2d6aac35457e7524078a4b4a8b011f84c45c (patch)
tree8a71e5308e1e5f0fbae089dc8fef993169097fbf /include
parent9388395c21e512796b39baca81324ffb7b70de60 (diff)
downloadklee-870f2d6aac35457e7524078a4b4a8b011f84c45c.tar.gz
llvm: make KLEE compile against LLVM 3.7
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/klee/Internal/Support/FloatEvaluation.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/klee/Internal/Support/FloatEvaluation.h b/include/klee/Internal/Support/FloatEvaluation.h
index 6d9092f2..436e0dc8 100644
--- a/include/klee/Internal/Support/FloatEvaluation.h
+++ b/include/klee/Internal/Support/FloatEvaluation.h
@@ -132,8 +132,15 @@ inline uint64_t mod(uint64_t l, uint64_t r, unsigned inWidth) {
 // determine if l represents NaN
 inline bool isNaN(uint64_t l, unsigned inWidth) {
   switch( inWidth ) {
+#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 7)
+  case FLT_BITS:
+    return std::isnan(UInt64AsFloat(l));
+  case DBL_BITS:
+    return std::isnan(UInt64AsDouble(l));
+#else
   case FLT_BITS: return llvm::IsNAN( UInt64AsFloat(l) );
   case DBL_BITS: return llvm::IsNAN( UInt64AsDouble(l) );
+#endif
   default: llvm::report_fatal_error("unsupported floating point width");
   }
 }