summaryrefslogtreecommitdiffstats
path: root/llvm/lib/LTO/LTOCodeGenerator.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/lib/LTO/LTOCodeGenerator.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/lib/LTO/LTOCodeGenerator.cpp')
-rw-r--r--llvm/lib/LTO/LTOCodeGenerator.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/LTO/LTOCodeGenerator.cpp b/llvm/lib/LTO/LTOCodeGenerator.cpp
index f37d0a9fa44..6e5bdaa97c7 100644
--- a/llvm/lib/LTO/LTOCodeGenerator.cpp
+++ b/llvm/lib/LTO/LTOCodeGenerator.cpp
@@ -26,6 +26,7 @@
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/DiagnosticPrinter.h"
#include "llvm/IR/LLVMContext.h"
+#include "llvm/IR/LegacyPassManager.h"
#include "llvm/IR/Mangler.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Verifier.h"
@@ -35,7 +36,6 @@
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/SubtargetFeature.h"
-#include "llvm/PassManager.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/FormattedStream.h"
@@ -428,7 +428,7 @@ void LTOCodeGenerator::applyScopeRestrictions() {
Module *mergedModule = IRLinker.getModule();
// Start off with a verification pass.
- PassManager passes;
+ legacy::PassManager passes;
passes.add(createVerifierPass());
passes.add(createDebugInfoVerifierPass());
@@ -499,7 +499,7 @@ bool LTOCodeGenerator::optimize(bool DisableOpt,
this->applyScopeRestrictions();
// Instantiate the pass manager to organize the passes.
- PassManager passes;
+ legacy::PassManager passes;
// Add an appropriate DataLayout instance for this module...
mergedModule->setDataLayout(TargetMach->getDataLayout());
@@ -538,7 +538,7 @@ bool LTOCodeGenerator::compileOptimized(raw_ostream &out, std::string &errMsg) {
// Mark which symbols can not be internalized
this->applyScopeRestrictions();
- PassManager codeGenPasses;
+ legacy::PassManager codeGenPasses;
codeGenPasses.add(new DataLayoutPass());
OpenPOWER on IntegriCloud