Free all Constants in ~LLVMConstantImpl. We avoid assertion failures

by dropping all references from all constants that can use other
constants before trying to destroy any of them.

I also had to free bugpoint's Module in ~BugDriver().



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99160 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jeffrey Yasskin
2010-03-22 05:23:37 +00:00
parent d592e1a809
commit c1dc067970
4 changed files with 32 additions and 6 deletions
+4
View File
@@ -75,6 +75,10 @@ BugDriver::BugDriver(const char *toolname, bool as_child, bool find_bugs,
run_as_child(as_child), run_find_bugs(find_bugs), Timeout(timeout),
MemoryLimit(memlimit), UseValgrind(use_valgrind) {}
BugDriver::~BugDriver() {
delete Program;
}
/// ParseInputFile - Given a bitcode or assembly input filename, parse and
/// return it, or return null if not possible.