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
diff --git a/lib/CodeGen/MachineFunctionAnalysis.cpp b/lib/CodeGen/MachineFunctionAnalysis.cpp
index 8b7dba8..ae9d5a9 100644
--- a/lib/CodeGen/MachineFunctionAnalysis.cpp
+++ b/lib/CodeGen/MachineFunctionAnalysis.cpp
@@ -29,6 +29,10 @@
FunctionPass(&ID), TM(tm), OptLevel(OL), MF(0) {
}
+MachineFunctionAnalysis::~MachineFunctionAnalysis() {
+ assert(!MF && "MachineFunctionAnalysis left initialized!");
+}
+
bool MachineFunctionAnalysis::runOnFunction(Function &F) {
assert(!MF && "MachineFunctionAnalysis already initialized!");
MF = new MachineFunction(&F, TM);