diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-26 04:35:26 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-26 04:35:26 +0000 |
commit | b84822fb7b64977c16e97b870891da1d6c9736fe (patch) | |
tree | fb43db9cabf515f2751c5c0aeb5e362a63fbc017 /include/llvm/CodeGen/MachineFunctionAnalysis.h | |
parent | b8da4ac698dbb219e093b3159e2b5519063b011c (diff) |
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
Diffstat (limited to 'include/llvm/CodeGen/MachineFunctionAnalysis.h')
-rw-r--r-- | include/llvm/CodeGen/MachineFunctionAnalysis.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/MachineFunctionAnalysis.h b/include/llvm/CodeGen/MachineFunctionAnalysis.h index aa4cc9176b..ee2c6ddc81 100644 --- a/include/llvm/CodeGen/MachineFunctionAnalysis.h +++ b/include/llvm/CodeGen/MachineFunctionAnalysis.h @@ -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; |