mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-02 07:32:52 +00:00
Give MachineFunctionAnalysis a destructor so it can verify that
that it released its allocated memory. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77775 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8a0336a44b
commit
f94083333c
@ -33,7 +33,7 @@ public:
|
|||||||
static char ID;
|
static char ID;
|
||||||
explicit MachineFunctionAnalysis(TargetMachine &tm,
|
explicit MachineFunctionAnalysis(TargetMachine &tm,
|
||||||
CodeGenOpt::Level OL = CodeGenOpt::Default);
|
CodeGenOpt::Level OL = CodeGenOpt::Default);
|
||||||
|
~MachineFunctionAnalysis();
|
||||||
|
|
||||||
MachineFunction &getMF() const { return *MF; }
|
MachineFunction &getMF() const { return *MF; }
|
||||||
CodeGenOpt::Level getOptLevel() const { return OptLevel; }
|
CodeGenOpt::Level getOptLevel() const { return OptLevel; }
|
||||||
|
@ -29,6 +29,10 @@ MachineFunctionAnalysis::MachineFunctionAnalysis(TargetMachine &tm,
|
|||||||
FunctionPass(&ID), TM(tm), OptLevel(OL), MF(0) {
|
FunctionPass(&ID), TM(tm), OptLevel(OL), MF(0) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MachineFunctionAnalysis::~MachineFunctionAnalysis() {
|
||||||
|
assert(!MF && "MachineFunctionAnalysis left initialized!");
|
||||||
|
}
|
||||||
|
|
||||||
bool MachineFunctionAnalysis::runOnFunction(Function &F) {
|
bool MachineFunctionAnalysis::runOnFunction(Function &F) {
|
||||||
assert(!MF && "MachineFunctionAnalysis already initialized!");
|
assert(!MF && "MachineFunctionAnalysis already initialized!");
|
||||||
MF = new MachineFunction(&F, TM);
|
MF = new MachineFunction(&F, TM);
|
||||||
|
Loading…
Reference in New Issue
Block a user