From 39630fd66650ddb90c155ed1d0b10d9027438296 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Wed, 7 Jun 2017 14:54:32 +0200 Subject: llvm4: APFloat members are functions Signed-off-by: Jiri Slaby --- lib/Core/Executor.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib') 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; } -- cgit 1.4.1