summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/IR/LegacyPassManagerTest.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2015-02-13 10:01:29 +0000
committerChandler Carruth <chandlerc@gmail.com>2015-02-13 10:01:29 +0000
commit30d69c2e3681f2a422032bfaa3e085b17e948663 (patch)
treeb8d01386571f20c1458f21f9088ae3e4edd74d9e /llvm/unittests/IR/LegacyPassManagerTest.cpp
parent24f59101b6770a1eb697de5ab8525ea072b6441b (diff)
downloadbcm5719-llvm-30d69c2e3681f2a422032bfaa3e085b17e948663.tar.gz
bcm5719-llvm-30d69c2e3681f2a422032bfaa3e085b17e948663.zip
[PM] Remove the old 'PassManager.h' header file at the top level of
LLVM's include tree and the use of using declarations to hide the 'legacy' namespace for the old pass manager. This undoes the primary modules-hostile change I made to keep out-of-tree targets building. I sent an email inquiring about whether this would be reasonable to do at this phase and people seemed fine with it, so making it a reality. This should allow us to start bootstrapping with modules to a certain extent along with making it easier to mix and match headers in general. The updates to any code for users of LLVM are very mechanical. Switch from including "llvm/PassManager.h" to "llvm/IR/LegacyPassManager.h". Qualify the types which now produce compile errors with "legacy::". The most common ones are "PassManager", "PassManagerBase", and "FunctionPassManager". llvm-svn: 229094
Diffstat (limited to 'llvm/unittests/IR/LegacyPassManagerTest.cpp')
-rw-r--r--llvm/unittests/IR/LegacyPassManagerTest.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/llvm/unittests/IR/LegacyPassManagerTest.cpp b/llvm/unittests/IR/LegacyPassManagerTest.cpp
index 6b557c9b477..9cb94140766 100644
--- a/llvm/unittests/IR/LegacyPassManagerTest.cpp
+++ b/llvm/unittests/IR/LegacyPassManagerTest.cpp
@@ -8,13 +8,12 @@
//===----------------------------------------------------------------------===//
//
// This unit test exercises the legacy pass manager infrastructure. We use the
-// old names as well to ensure that the source-level compatibility wrapper
-// works for out-of-tree code that expects to include llvm/PassManager.h and
-// subclass the core pass classes.
+// old names as well to ensure that the source-level compatibility is preserved
+// where possible.
//
//===----------------------------------------------------------------------===//
-#include "llvm/PassManager.h"
+#include "llvm/IR/LegacyPassManager.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Analysis/CallGraphSCCPass.h"
#include "llvm/Analysis/LoopInfo.h"
@@ -302,7 +301,7 @@ namespace llvm {
mNDM->run = mNDNM->run = mDNM->run = mNDM2->run = 0;
- PassManager Passes;
+ legacy::PassManager Passes;
Passes.add(new DataLayoutPass());
Passes.add(mNDM2);
Passes.add(mNDM);
@@ -326,7 +325,7 @@ namespace llvm {
mNDM->run = mNDNM->run = mDNM->run = mNDM2->run = 0;
- PassManager Passes;
+ legacy::PassManager Passes;
Passes.add(new DataLayoutPass());
Passes.add(mNDM);
Passes.add(mNDNM);
@@ -348,7 +347,7 @@ namespace llvm {
void MemoryTestHelper(int run) {
std::unique_ptr<Module> M(makeLLVMModule());
T *P = new T();
- PassManager Passes;
+ legacy::PassManager Passes;
Passes.add(new DataLayoutPass());
Passes.add(P);
Passes.run(*M);
@@ -359,7 +358,7 @@ namespace llvm {
void MemoryTestHelper(int run, int N) {
Module *M = makeLLVMModule();
T *P = new T();
- PassManager Passes;
+ legacy::PassManager Passes;
Passes.add(new DataLayoutPass());
Passes.add(P);
Passes.run(*M);
@@ -397,7 +396,7 @@ namespace llvm {
{
SCOPED_TRACE("Running OnTheFlyTest");
struct OnTheFlyTest *O = new OnTheFlyTest();
- PassManager Passes;
+ legacy::PassManager Passes;
Passes.add(new DataLayoutPass());
Passes.add(O);
Passes.run(*M);
OpenPOWER on IntegriCloud