aboutsummaryrefslogtreecommitdiff
path: root/src/common/dump_stabs.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/dump_stabs.cc')
-rw-r--r--src/common/dump_stabs.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/common/dump_stabs.cc b/src/common/dump_stabs.cc
index 436b6215..e4ae1e1b 100644
--- a/src/common/dump_stabs.cc
+++ b/src/common/dump_stabs.cc
@@ -56,6 +56,15 @@ static string Demangle(const string &mangled) {
return string(mangled);
}
+DumpStabsHandler::~DumpStabsHandler() {
+ // Free any functions we've accumulated but not added to the module.
+ for (vector<Module::Function *>::iterator func_it = functions_.begin();
+ func_it != functions_.end(); func_it++)
+ delete *func_it;
+ // Free any function that we're currently within.
+ delete current_function_;
+}
+
bool DumpStabsHandler::StartCompilationUnit(const char *name, uint64_t address,
const char *build_directory) {
assert(!in_compilation_unit_);