about summary refs log tree commit diff homepage
path: root/lib
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2017-06-07 14:54:32 +0200
committerMartinNowack <martin.nowack@gmail.com>2018-09-18 10:36:36 +0100
commit39630fd66650ddb90c155ed1d0b10d9027438296 (patch)
treec3d7d872b61e556fe12da89d246299a08f90f7a9 /lib
parent411754f7922a21229f9d3d4349cfb766900228ec (diff)
downloadklee-39630fd66650ddb90c155ed1d0b10d9027438296.tar.gz
llvm4: APFloat members are functions
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Core/Executor.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
index 7f69a618..1a5b7b9d 100644
--- a/lib/Core/Executor.cpp
+++ b/lib/Core/Executor.cpp
@@ -1480,12 +1480,21 @@ static bool isDebugIntrinsic(const Function *f, KModule *KM) {
 
 static inline const llvm::fltSemantics * fpWidthToSemantics(unsigned width) {
   switch(width) {
+#if LLVM_VERSION_CODE >= LLVM_VERSION(4, 0)
+  case Expr::Int32:
+    return &llvm::APFloat::IEEEsingle();
+  case Expr::Int64:
+    return &llvm::APFloat::IEEEdouble();
+  case Expr::Fl80:
+    return &llvm::APFloat::x87DoubleExtended();
+#else
   case Expr::Int32:
     return &llvm::APFloat::IEEEsingle;
   case Expr::Int64:
     return &llvm::APFloat::IEEEdouble;
   case Expr::Fl80:
     return &llvm::APFloat::x87DoubleExtended;
+#endif
   default:
     return 0;
   }