summaryrefslogtreecommitdiffstats
path: root/llvm/tools/bugpoint/ExtractFunction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/bugpoint/ExtractFunction.cpp')
-rw-r--r--llvm/tools/bugpoint/ExtractFunction.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/tools/bugpoint/ExtractFunction.cpp b/llvm/tools/bugpoint/ExtractFunction.cpp
index 078c7baf4e9..0eecc49efd6 100644
--- a/llvm/tools/bugpoint/ExtractFunction.cpp
+++ b/llvm/tools/bugpoint/ExtractFunction.cpp
@@ -98,7 +98,7 @@ static const PassInfo *getPI(Pass *P) {
/// performFinalCleanups - This method clones the current Program and performs
/// a series of cleanups intended to get rid of extra cruft on the module
-/// before handing it to the user...
+/// before handing it to the user.
///
Module *BugDriver::performFinalCleanups(Module *M, bool MayModifySemantics) {
// Make all functions external, so GlobalDCE doesn't delete them...
@@ -118,6 +118,7 @@ Module *BugDriver::performFinalCleanups(Module *M, bool MayModifySemantics) {
Module *New = runPassesOn(M, CleanupPasses);
if (New == 0) {
std::cerr << "Final cleanups failed. Sorry. :( Please report a bug!\n";
+ return M;
}
delete M;
return New;
OpenPOWER on IntegriCloud