diff options
author | Dan Gohman <gohman@apple.com> | 2008-03-11 22:29:46 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-03-11 22:29:46 +0000 |
commit | 24570836b2a20db78a92887344614bfda24d56af (patch) | |
tree | cdcc1166edbbfaba82d9aba42a78c5b8e6de2028 /llvm/lib/CodeGen | |
parent | da7db7d9a13ee2bac0ae7d28b131669580b856a2 (diff) | |
download | bcm5719-llvm-24570836b2a20db78a92887344614bfda24d56af.tar.gz bcm5719-llvm-24570836b2a20db78a92887344614bfda24d56af.zip |
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.
llvm-svn: 48256
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/ELFWriter.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/CodeGen/LLVMTargetMachine.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/CodeGen/MachOWriter.cpp | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/ELFWriter.cpp b/llvm/lib/CodeGen/ELFWriter.cpp index 82bf9924d84..8b6fbb779af 100644 --- a/llvm/lib/CodeGen/ELFWriter.cpp +++ b/llvm/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/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp index 32fbc15e131..33cf6b54891 100644 --- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp +++ b/llvm/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/llvm/lib/CodeGen/MachOWriter.cpp b/llvm/lib/CodeGen/MachOWriter.cpp index d163df3c4fe..f77f85e98d5 100644 --- a/llvm/lib/CodeGen/MachOWriter.cpp +++ b/llvm/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(); } |