about summary refs log tree commit diff homepage
path: root/lib/Module
diff options
context:
space:
mode:
authorJulian Büning <julian.buening@rwth-aachen.de>2019-03-20 21:27:46 +0100
committerMartinNowack <martin.nowack@gmail.com>2019-03-21 12:46:01 +0000
commit0c1acd51e99968cc79863b714b4ebc89588a4c00 (patch)
tree2762086d9ba74b8ca45876ad3377c507681bda07 /lib/Module
parent539323d70215d0248303078f9c400a88dfeb8012 (diff)
downloadklee-0c1acd51e99968cc79863b714b4ebc89588a4c00.tar.gz
remove obsolete LegacyLLVMPassManagerTy
Diffstat (limited to 'lib/Module')
-rw-r--r--lib/Module/KModule.cpp10
-rw-r--r--lib/Module/ModuleUtil.cpp2
-rw-r--r--lib/Module/Optimize.cpp8
3 files changed, 9 insertions, 11 deletions
diff --git a/lib/Module/KModule.cpp b/lib/Module/KModule.cpp
index f4b71208..207d4bd4 100644
--- a/lib/Module/KModule.cpp
+++ b/lib/Module/KModule.cpp
@@ -16,7 +16,6 @@
 #include "klee/Internal/Module/InstructionInfoTable.h"
 #include "klee/Internal/Module/KInstruction.h"
 #include "klee/Internal/Module/KModule.h"
-#include "klee/Internal/Module/LLVMPassManager.h"
 #include "klee/Internal/Support/Debug.h"
 #include "klee/Internal/Support/ErrorHandling.h"
 #include "klee/Internal/Support/ModuleUtil.h"
@@ -31,6 +30,7 @@
 #include "llvm/IR/DataLayout.h"
 #include "llvm/IR/IRBuilder.h"
 #include "llvm/IR/Instructions.h"
+#include "llvm/IR/LegacyPassManager.h"
 #include "llvm/IR/LLVMContext.h"
 #include "llvm/IR/Module.h"
 #include "llvm/IR/ValueSymbolTable.h"
@@ -245,7 +245,7 @@ void KModule::instrument(const Interpreter::ModuleOptions &opts) {
   // invariant transformations that we will end up doing later so that
   // optimize is seeing what is as close as possible to the final
   // module.
-  LegacyLLVMPassManagerTy pm;
+  legacy::PassManager pm;
   pm.add(new RaiseAsmPass());
 
   // This pass will scalarize as much code as possible so that the Executor
@@ -271,7 +271,7 @@ void KModule::optimiseAndPrepare(
   // Preserve all functions containing klee-related function calls from being
   // optimised around
   if (!OptimiseKLEECall) {
-    LegacyLLVMPassManagerTy pm;
+    legacy::PassManager pm;
     pm.add(new OptNonePass());
     pm.run(*module);
   }
@@ -295,7 +295,7 @@ void KModule::optimiseAndPrepare(
   // linked in something with intrinsics but any external calls are
   // going to be unresolved. We really need to handle the intrinsics
   // directly I think?
-  LegacyLLVMPassManagerTy pm3;
+  legacy::PassManager pm3;
   pm3.add(createCFGSimplificationPass());
   switch(SwitchType) {
   case eSwitchTypeInternal: break;
@@ -375,7 +375,7 @@ void KModule::checkModule() {
   InstructionOperandTypeCheckPass *operandTypeCheckPass =
       new InstructionOperandTypeCheckPass();
 
-  LegacyLLVMPassManagerTy pm;
+  legacy::PassManager pm;
   if (!DontVerify)
     pm.add(createVerifierPass());
   pm.add(operandTypeCheckPass);
diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp
index 5c9aad1a..6152c1df 100644
--- a/lib/Module/ModuleUtil.cpp
+++ b/lib/Module/ModuleUtil.cpp
@@ -56,8 +56,6 @@
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Support/Path.h"
 
-#include "klee/Internal/Module/LLVMPassManager.h"
-
 #include <algorithm>
 #include <fstream>
 #include <map>
diff --git a/lib/Module/Optimize.cpp b/lib/Module/Optimize.cpp
index 22b9a16a..0980c060 100644
--- a/lib/Module/Optimize.cpp
+++ b/lib/Module/Optimize.cpp
@@ -16,7 +16,6 @@
 //===----------------------------------------------------------------------===//
 
 #include "klee/Config/Version.h"
-#include "klee/Internal/Module/LLVMPassManager.h"
 #include "klee/OptionCategories.h"
 
 #ifdef USE_WORKAROUND_LLVM_PR39177
@@ -27,6 +26,7 @@
 #include "llvm/Analysis/LoopPass.h"
 #include "llvm/IR/Module.h"
 #include "llvm/IR/DataLayout.h"
+#include "llvm/IR/LegacyPassManager.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/DynamicLibrary.h"
 #include "llvm/Support/PluginLoader.h"
@@ -93,7 +93,7 @@ static cl::alias A1("S", cl::desc("Alias for --strip-debug"),
 
 // A utility function that adds a pass to the pass manager but will also add
 // a verifier pass after if we're supposed to verify.
-static inline void addPass(klee::LegacyLLVMPassManagerTy &PM, Pass *P) {
+static inline void addPass(legacy::PassManager &PM, Pass *P) {
   // Add the pass to the pass manager...
   PM.add(P);
 
@@ -105,7 +105,7 @@ static inline void addPass(klee::LegacyLLVMPassManagerTy &PM, Pass *P) {
 namespace llvm {
 
 
-static void AddStandardCompilePasses(klee::LegacyLLVMPassManagerTy &PM) {
+static void AddStandardCompilePasses(legacy::PassManager &PM) {
   PM.add(createVerifierPass());                  // Verify that input is correct
 
   // If the -strip-debug command line option was specified, do it.
@@ -180,7 +180,7 @@ static void AddStandardCompilePasses(klee::LegacyLLVMPassManagerTy &PM) {
 void Optimize(Module *M, llvm::ArrayRef<const char *> preservedFunctions) {
 
   // Instantiate the pass manager to organize the passes.
-  klee::LegacyLLVMPassManagerTy Passes;
+  legacy::PassManager Passes;
 
   // If we're verifying, start off with a verification pass.
   if (VerifyEach)