diff options
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/tools/bugpoint/OptimizerDriver.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/tools/bugpoint/OptimizerDriver.cpp b/llvm/tools/bugpoint/OptimizerDriver.cpp index 7cfc4fb4994..37e2f74f45d 100644 --- a/llvm/tools/bugpoint/OptimizerDriver.cpp +++ b/llvm/tools/bugpoint/OptimizerDriver.cpp @@ -52,7 +52,11 @@ bool BugDriver::writeProgramToFile(const std::string &Filename, std::ios::binary; std::ofstream Out(Filename.c_str(), io_mode); if (!Out.good()) return true; - WriteBytecodeToFile(M ? M : Program, Out, /*compression=*/true); + try { + WriteBytecodeToFile(M ? M : Program, Out, /*compression=*/true); + } catch (...) { + return true; + } return false; } |

