mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Refactor the addPassesToEmitAssembly interface into a addPassesToEmitFile
interface. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22282 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1725,7 +1725,10 @@ void CWriter::visitVAArgInst(VAArgInst &I) {
|
||||
// External Interface declaration
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
bool CTargetMachine::addPassesToEmitAssembly(PassManager &PM, std::ostream &o) {
|
||||
bool CTargetMachine::addPassesToEmitFile(PassManager &PM, std::ostream &o,
|
||||
CodeGenFileType FileType) {
|
||||
if (FileType != TargetMachine::AssemblyFile) return true;
|
||||
|
||||
PM.add(createLowerGCPass());
|
||||
PM.add(createLowerAllocationsPass(true));
|
||||
PM.add(createLowerInvokePass());
|
||||
@@ -1733,5 +1736,3 @@ bool CTargetMachine::addPassesToEmitAssembly(PassManager &PM, std::ostream &o) {
|
||||
PM.add(new CWriter(o, getIntrinsicLowering()));
|
||||
return false;
|
||||
}
|
||||
|
||||
// vim: sw=2
|
||||
|
@@ -24,7 +24,8 @@ struct CTargetMachine : public TargetMachine {
|
||||
TargetMachine("CBackend", IL, M) {}
|
||||
|
||||
// This is the only thing that actually does anything here.
|
||||
virtual bool addPassesToEmitAssembly(PassManager &PM, std::ostream &Out);
|
||||
virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
|
||||
CodeGenFileType FileType);
|
||||
|
||||
// This class always works, but shouldn't be the default in most cases.
|
||||
static unsigned getModuleMatchQuality(const Module &M) { return 1; }
|
||||
|
@@ -1725,7 +1725,10 @@ void CWriter::visitVAArgInst(VAArgInst &I) {
|
||||
// External Interface declaration
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
bool CTargetMachine::addPassesToEmitAssembly(PassManager &PM, std::ostream &o) {
|
||||
bool CTargetMachine::addPassesToEmitFile(PassManager &PM, std::ostream &o,
|
||||
CodeGenFileType FileType) {
|
||||
if (FileType != TargetMachine::AssemblyFile) return true;
|
||||
|
||||
PM.add(createLowerGCPass());
|
||||
PM.add(createLowerAllocationsPass(true));
|
||||
PM.add(createLowerInvokePass());
|
||||
@@ -1733,5 +1736,3 @@ bool CTargetMachine::addPassesToEmitAssembly(PassManager &PM, std::ostream &o) {
|
||||
PM.add(new CWriter(o, getIntrinsicLowering()));
|
||||
return false;
|
||||
}
|
||||
|
||||
// vim: sw=2
|
||||
|
Reference in New Issue
Block a user