aboutsummaryrefslogtreecommitdiff
path: root/tools/bugpoint
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@google.com>2010-03-22 05:23:37 +0000
committerJeffrey Yasskin <jyasskin@google.com>2010-03-22 05:23:37 +0000
commitc1dc0679706f7538cd17169b920967c54661e5b6 (patch)
tree815521d8e780e580649eadf2a1d71bdaeac048e8 /tools/bugpoint
parentd592e1a809c0322cac26ddc630a00e46639eaf32 (diff)
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
Diffstat (limited to 'tools/bugpoint')
-rw-r--r--tools/bugpoint/BugDriver.cpp4
-rw-r--r--tools/bugpoint/BugDriver.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/tools/bugpoint/BugDriver.cpp b/tools/bugpoint/BugDriver.cpp
index 813c96cc79..024d8e219f 100644
--- a/tools/bugpoint/BugDriver.cpp
+++ b/tools/bugpoint/BugDriver.cpp
@@ -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.
diff --git a/tools/bugpoint/BugDriver.h b/tools/bugpoint/BugDriver.h
index 0a10a61c21..abc249868d 100644
--- a/tools/bugpoint/BugDriver.h
+++ b/tools/bugpoint/BugDriver.h
@@ -65,6 +65,7 @@ public:
BugDriver(const char *toolname, bool as_child, bool find_bugs,
unsigned timeout, unsigned memlimit, bool use_valgrind,
LLVMContext& ctxt);
+ ~BugDriver();
const char *getToolName() const { return ToolName; }