about summary refs log tree commit diff homepage
path: root/lib/Module
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2018-09-02 13:53:22 +0200
committerMartinNowack <martin.nowack@gmail.com>2018-10-26 22:41:04 +0100
commit034d7d44dc95beffe98948cdb9fc160952e64dc9 (patch)
tree55ae01fca66b630d7fa257c2bf9485811872e6df /lib/Module
parentf326c6aab9ac1b38016076a1d0ff5b55e0813b87 (diff)
downloadklee-034d7d44dc95beffe98948cdb9fc160952e64dc9.tar.gz
llvm7: handle new header files
createLowerSwitchPass moved in llvm commit 49ca55e3813c to Utils.h.
createInstructionCombiningPass moved in llvm commitb5b7fce64c1d to
InstCombine.h. So add the includes where needed.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Diffstat (limited to 'lib/Module')
-rw-r--r--lib/Module/KModule.cpp4
-rw-r--r--lib/Module/Optimize.cpp5
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/Module/KModule.cpp b/lib/Module/KModule.cpp
index 1fc0cb18..8014e135 100644
--- a/lib/Module/KModule.cpp
+++ b/lib/Module/KModule.cpp
@@ -51,6 +51,10 @@
 
 #include "llvm/Transforms/Utils/Cloning.h"
 
+#if LLVM_VERSION_CODE >= LLVM_VERSION(7, 0)
+#include "llvm/Transforms/Utils.h"
+#endif
+
 #include <sstream>
 
 using namespace llvm;
diff --git a/lib/Module/Optimize.cpp b/lib/Module/Optimize.cpp
index 34af4626..627921cb 100644
--- a/lib/Module/Optimize.cpp
+++ b/lib/Module/Optimize.cpp
@@ -44,6 +44,11 @@
 #include "llvm/Transforms/Scalar/GVN.h"
 #endif
 
+#if LLVM_VERSION_CODE >= LLVM_VERSION(7, 0)
+#include "llvm/Transforms/Utils.h"
+#include "llvm/Transforms/InstCombine/InstCombine.h"
+#endif
+
 using namespace llvm;
 
 // Don't verify at the end