aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-03-11 22:29:46 +0000
committerDan Gohman <gohman@apple.com>2008-03-11 22:29:46 +0000
commitbfae83139dcb4fffd50b939e1b1224b0126f04d4 (patch)
tree384a612855c8cb2cdf31642dc137ed7c9081449b /lib/CodeGen
parente846dd89c173d462d197046b76d37588896623f3 (diff)
downloadexternal_llvm-bfae83139dcb4fffd50b939e1b1224b0126f04d4.zip
external_llvm-bfae83139dcb4fffd50b939e1b1224b0126f04d4.tar.gz
external_llvm-bfae83139dcb4fffd50b939e1b1224b0126f04d4.tar.bz2
Use PassManagerBase instead of FunctionPassManager for functions
that merely add passes. This allows them to be used with either FunctionPassManager or PassManager, or even with a custom new kind of pass manager. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48256 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/ELFWriter.cpp4
-rw-r--r--lib/CodeGen/LLVMTargetMachine.cpp6
-rw-r--r--lib/CodeGen/MachOWriter.cpp4
3 files changed, 7 insertions, 7 deletions
diff --git a/lib/CodeGen/ELFWriter.cpp b/lib/CodeGen/ELFWriter.cpp
index 82bf992..8b6fbb7 100644
--- a/lib/CodeGen/ELFWriter.cpp
+++ b/lib/CodeGen/ELFWriter.cpp
@@ -50,11 +50,11 @@ using namespace llvm;
char ELFWriter::ID = 0;
/// AddELFWriter - Concrete function to add the ELF writer to the function pass
/// manager.
-MachineCodeEmitter *llvm::AddELFWriter(FunctionPassManager &FPM,
+MachineCodeEmitter *llvm::AddELFWriter(PassManagerBase &PM,
std::ostream &O,
TargetMachine &TM) {
ELFWriter *EW = new ELFWriter(O, TM);
- FPM.add(EW);
+ PM.add(EW);
return &EW->getMachineCodeEmitter();
}
diff --git a/lib/CodeGen/LLVMTargetMachine.cpp b/lib/CodeGen/LLVMTargetMachine.cpp
index 32fbc15..33cf6b5 100644
--- a/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/lib/CodeGen/LLVMTargetMachine.cpp
@@ -51,7 +51,7 @@ DisablePostRAScheduler("disable-post-RA-scheduler",
cl::init(true));
FileModel::Model
-LLVMTargetMachine::addPassesToEmitFile(FunctionPassManager &PM,
+LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
std::ostream &Out,
CodeGenFileType FileType,
bool Fast) {
@@ -158,7 +158,7 @@ LLVMTargetMachine::addPassesToEmitFile(FunctionPassManager &PM,
/// addPassesToEmitFileFinish - If the passes to emit the specified file had to
/// be split up (e.g., to add an object writer pass), this method can be used to
/// finish up adding passes to emit the file, if necessary.
-bool LLVMTargetMachine::addPassesToEmitFileFinish(FunctionPassManager &PM,
+bool LLVMTargetMachine::addPassesToEmitFileFinish(PassManagerBase &PM,
MachineCodeEmitter *MCE,
bool Fast) {
if (MCE)
@@ -178,7 +178,7 @@ bool LLVMTargetMachine::addPassesToEmitFileFinish(FunctionPassManager &PM,
/// of functions. This method should returns true if machine code emission is
/// not supported.
///
-bool LLVMTargetMachine::addPassesToEmitMachineCode(FunctionPassManager &PM,
+bool LLVMTargetMachine::addPassesToEmitMachineCode(PassManagerBase &PM,
MachineCodeEmitter &MCE,
bool Fast) {
// Standard LLVM-Level Passes.
diff --git a/lib/CodeGen/MachOWriter.cpp b/lib/CodeGen/MachOWriter.cpp
index d163df3..f77f85e 100644
--- a/lib/CodeGen/MachOWriter.cpp
+++ b/lib/CodeGen/MachOWriter.cpp
@@ -43,11 +43,11 @@ using namespace llvm;
/// AddMachOWriter - Concrete function to add the Mach-O writer to the function
/// pass manager.
-MachineCodeEmitter *llvm::AddMachOWriter(FunctionPassManager &FPM,
+MachineCodeEmitter *llvm::AddMachOWriter(PassManagerBase &PM,
std::ostream &O,
TargetMachine &TM) {
MachOWriter *MOW = new MachOWriter(O, TM);
- FPM.add(MOW);
+ PM.add(MOW);
return &MOW->getMachineCodeEmitter();
}