-// DeleteFunctionBody - "Remove" the function by deleting all of its basic
-// blocks, making it external.
-//
-void llvm::DeleteFunctionBody(Function *F) {
- // delete the body of the function...
- F->deleteBody();
- assert(F->isExternal() && "This didn't make the function external!");
+BugDriver::BugDriver(const char *toolname, bool find_bugs,
+ unsigned timeout, unsigned memlimit, bool use_valgrind,
+ LLVMContext& ctxt)
+ : Context(ctxt), ToolName(toolname), ReferenceOutputFile(OutputFile),
+ Program(nullptr), Interpreter(nullptr), SafeInterpreter(nullptr),
+ gcc(nullptr), run_find_bugs(find_bugs), Timeout(timeout),
+ MemoryLimit(memlimit), UseValgrind(use_valgrind) {}
+
+BugDriver::~BugDriver() {
+ delete Program;
+ if (Interpreter != SafeInterpreter)
+ delete Interpreter;
+ delete SafeInterpreter;
+ delete gcc;