mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
[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". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229094 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -51,8 +51,8 @@
|
||||
#include "llvm/IR/Function.h"
|
||||
#include "llvm/IR/InstVisitor.h"
|
||||
#include "llvm/IR/IntrinsicInst.h"
|
||||
#include "llvm/IR/LegacyPassManager.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/PassManager.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
using namespace llvm;
|
||||
@@ -903,7 +903,7 @@ void llvm::lintFunction(const Function &f) {
|
||||
Function &F = const_cast<Function&>(f);
|
||||
assert(!F.isDeclaration() && "Cannot lint external functions");
|
||||
|
||||
FunctionPassManager FPM(F.getParent());
|
||||
legacy::FunctionPassManager FPM(F.getParent());
|
||||
Lint *V = new Lint();
|
||||
FPM.add(V);
|
||||
FPM.run(F);
|
||||
@@ -912,7 +912,7 @@ void llvm::lintFunction(const Function &f) {
|
||||
/// lintModule - Check a module for errors, printing messages on stderr.
|
||||
///
|
||||
void llvm::lintModule(const Module &M) {
|
||||
PassManager PM;
|
||||
legacy::PassManager PM;
|
||||
Lint *V = new Lint();
|
||||
PM.add(V);
|
||||
PM.run(const_cast<Module&>(M));
|
||||
|
||||
Reference in New Issue
Block a user