llvm-readobj: remove some dead code
[oota-llvm.git] / tools / bugpoint / BugDriver.cpp
index 043863a354e654652deb4b28cec25ff462320b50..cecccbe0f0ef52268d7425aa67be4a73c92f96fc 100644 (file)
@@ -76,6 +76,10 @@ BugDriver::BugDriver(const char *toolname, bool find_bugs,
 
 BugDriver::~BugDriver() {
   delete Program;
+  if (Interpreter != SafeInterpreter)
+    delete Interpreter;
+  delete SafeInterpreter;
+  delete gcc;
 }
 
 
@@ -112,7 +116,7 @@ Module *llvm::ParseInputFile(const std::string &Filename,
 // parsed), and false on success.
 //
 bool BugDriver::addSources(const std::vector<std::string> &Filenames) {
-  assert(Program == 0 && "Cannot call addSources multiple times!");
+  assert(!Program && "Cannot call addSources multiple times!");
   assert(!Filenames.empty() && "Must specify at least on input filename!");
 
   // Load the first input file.