mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
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
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
@@ -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.
|
||||
|
@@ -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();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user