summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp2
-rw-r--r--llvm/lib/IR/CMakeLists.txt4
-rw-r--r--llvm/lib/IR/LegacyPassManager.cpp (renamed from llvm/lib/IR/PassManager.cpp)30
3 files changed, 22 insertions, 14 deletions
diff --git a/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp b/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp
index a0d788f34a3..182beca3643 100644
--- a/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp
+++ b/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp
@@ -22,7 +22,7 @@
#include "llvm/Analysis/CallGraph.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IntrinsicInst.h"
-#include "llvm/PassManagers.h"
+#include "llvm/IR/LegacyPassManagers.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Timer.h"
diff --git a/llvm/lib/IR/CMakeLists.txt b/llvm/lib/IR/CMakeLists.txt
index c2a4ee3aae1..2ad5fdb25be 100644
--- a/llvm/lib/IR/CMakeLists.txt
+++ b/llvm/lib/IR/CMakeLists.txt
@@ -6,10 +6,10 @@ add_llvm_library(LLVMCore
ConstantFold.cpp
Constants.cpp
Core.cpp
+ DIBuilder.cpp
DataLayout.cpp
DebugInfo.cpp
DebugLoc.cpp
- DIBuilder.cpp
Dominators.cpp
Function.cpp
GCOV.cpp
@@ -23,10 +23,10 @@ add_llvm_library(LLVMCore
LLVMContext.cpp
LLVMContextImpl.cpp
LeakDetector.cpp
+ LegacyPassManager.cpp
Metadata.cpp
Module.cpp
Pass.cpp
- PassManager.cpp
PassRegistry.cpp
PrintModulePass.cpp
Type.cpp
diff --git a/llvm/lib/IR/PassManager.cpp b/llvm/lib/IR/LegacyPassManager.cpp
index 8d2e2ca89ba..a431d8256d7 100644
--- a/llvm/lib/IR/PassManager.cpp
+++ b/llvm/lib/IR/LegacyPassManager.cpp
@@ -1,4 +1,4 @@
-//===- PassManager.cpp - LLVM Pass Infrastructure Implementation ----------===//
+//===- LegacyPassManager.cpp - LLVM Pass Infrastructure Implementation ----===//
//
// The LLVM Compiler Infrastructure
//
@@ -7,16 +7,16 @@
//
//===----------------------------------------------------------------------===//
//
-// This file implements the LLVM Pass Manager infrastructure.
+// This file implements the legacy LLVM Pass Manager infrastructure.
//
//===----------------------------------------------------------------------===//
-#include "llvm/PassManagers.h"
#include "llvm/Assembly/PrintModulePass.h"
#include "llvm/Assembly/Writer.h"
+#include "llvm/IR/LegacyPassManager.h"
#include "llvm/IR/Module.h"
-#include "llvm/PassManager.h"
+#include "llvm/IR/LegacyPassManagers.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
@@ -28,11 +28,10 @@
#include <algorithm>
#include <map>
using namespace llvm;
+using namespace llvm::legacy;
// See PassManagers.h for Pass Manager infrastructure overview.
-namespace llvm {
-
//===----------------------------------------------------------------------===//
// Pass debugging information. Often it is useful to find out what pass is
// running when a crash occurs in a utility. When this library is compiled with
@@ -40,10 +39,12 @@ namespace llvm {
// pass name to be printed before it executes.
//
+namespace {
// Different debug levels that can be enabled...
enum PassDebugLevel {
Disabled, Arguments, Structure, Executions, Details
};
+}
static cl::opt<enum PassDebugLevel>
PassDebugging("debug-pass", cl::Hidden,
@@ -56,8 +57,10 @@ PassDebugging("debug-pass", cl::Hidden,
clEnumVal(Details , "print pass details when it is executed"),
clEnumValEnd));
+namespace {
typedef llvm::cl::list<const llvm::PassInfo *, bool, PassNameParser>
PassOptionList;
+}
// Print IR out before/after specified passes.
static PassOptionList
@@ -106,8 +109,6 @@ static bool ShouldPrintAfterPass(const PassInfo *PI) {
return PrintAfterAll || ShouldPrintBeforeOrAfterPass(PI, PrintAfter);
}
-} // End of llvm namespace
-
/// isPassDebuggingExecutionsOrMore - Return true if -debug-pass=Executions
/// or higher is specified.
bool PMDataManager::isPassDebuggingExecutionsOrMore() const {
@@ -149,7 +150,6 @@ void PassManagerPrettyStackEntry::print(raw_ostream &OS) const {
namespace {
-
//===----------------------------------------------------------------------===//
// BBPassManager
//
@@ -206,10 +206,10 @@ public:
};
char BBPassManager::ID = 0;
-}
+} // End anonymous namespace
namespace llvm {
-
+namespace legacy {
//===----------------------------------------------------------------------===//
// FunctionPassManagerImpl
//
@@ -277,7 +277,10 @@ public:
void FunctionPassManagerImpl::anchor() {}
char FunctionPassManagerImpl::ID = 0;
+} // End of legacy namespace
+} // End of llvm namespace
+namespace {
//===----------------------------------------------------------------------===//
// MPPassManager
//
@@ -372,6 +375,10 @@ public:
};
char MPPassManager::ID = 0;
+} // End anonymous namespace
+
+namespace llvm {
+namespace legacy {
//===----------------------------------------------------------------------===//
// PassManagerImpl
//
@@ -437,6 +444,7 @@ public:
void PassManagerImpl::anchor() {}
char PassManagerImpl::ID = 0;
+} // End of legacy namespace
} // End of llvm namespace
namespace {
OpenPOWER on IntegriCloud