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();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user