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/Optimize.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/Module/Optimize.cpp') 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