mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
make MachineFunction keep track of its ID and make
MachineFunctionAnalysis dole them out, instead of having AsmPrinter do both. Have the AsmPrinter::SetupMachineFunction method set the 'AsmPrinter::MF' variable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94509 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -28,7 +28,7 @@ private:
|
||||
const TargetMachine &TM;
|
||||
CodeGenOpt::Level OptLevel;
|
||||
MachineFunction *MF;
|
||||
|
||||
unsigned NextFnNum;
|
||||
public:
|
||||
static char ID;
|
||||
explicit MachineFunctionAnalysis(const TargetMachine &tm,
|
||||
@@ -39,6 +39,7 @@ public:
|
||||
CodeGenOpt::Level getOptLevel() const { return OptLevel; }
|
||||
|
||||
private:
|
||||
virtual bool doInitialization(Module &) { NextFnNum = 1; return false; }
|
||||
virtual bool runOnFunction(Function &F);
|
||||
virtual void releaseMemory();
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const;
|
||||
|
Reference in New Issue
Block a user