From 034d7d44dc95beffe98948cdb9fc160952e64dc9 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Sun, 2 Sep 2018 13:53:22 +0200 Subject: 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 --- lib/Module/KModule.cpp | 4 ++++ lib/Module/Optimize.cpp | 5 +++++ 2 files changed, 9 insertions(+) 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 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 -- cgit 1.4.1