diff options
author | Jeffrey Yasskin <jyasskin@google.com> | 2010-03-22 05:23:37 +0000 |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@google.com> | 2010-03-22 05:23:37 +0000 |
commit | a6eedc3c032e9dd7754b109ebc09b9626d8e86ef (patch) | |
tree | 4e12a84b1a2fa11406d3f67c8884647983d532fb /llvm/tools/bugpoint | |
parent | 84559243036b1f7a1ae10b223c613edef15b3921 (diff) | |
download | bcm5719-llvm-a6eedc3c032e9dd7754b109ebc09b9626d8e86ef.tar.gz bcm5719-llvm-a6eedc3c032e9dd7754b109ebc09b9626d8e86ef.zip |
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().
llvm-svn: 99160
Diffstat (limited to 'llvm/tools/bugpoint')
-rw-r--r-- | llvm/tools/bugpoint/BugDriver.cpp | 4 | ||||
-rw-r--r-- | llvm/tools/bugpoint/BugDriver.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/llvm/tools/bugpoint/BugDriver.cpp b/llvm/tools/bugpoint/BugDriver.cpp index 813c96cc795..024d8e219fa 100644 --- a/llvm/tools/bugpoint/BugDriver.cpp +++ b/llvm/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/llvm/tools/bugpoint/BugDriver.h b/llvm/tools/bugpoint/BugDriver.h index 0a10a61c215..abc249868de 100644 --- a/llvm/tools/bugpoint/BugDriver.h +++ b/llvm/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; } |