summaryrefslogtreecommitdiff
path: root/tools/bugpoint/Miscompilation.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-08-23 20:34:57 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-08-23 20:34:57 +0000
commit51c5a286bae5ad27ddc49602f44b7ea7253a4cc9 (patch)
tree23e5816bdf4e8ea6f02a6d639101c9132ac3ea54 /tools/bugpoint/Miscompilation.cpp
parentcc2e0845c30cbbf79b51c6c39c102af27c19a1a8 (diff)
downloadllvm-51c5a286bae5ad27ddc49602f44b7ea7253a4cc9.tar.gz
llvm-51c5a286bae5ad27ddc49602f44b7ea7253a4cc9.tar.bz2
llvm-51c5a286bae5ad27ddc49602f44b7ea7253a4cc9.tar.xz
For PR797:
Final removal of exceptions from lib/System and adjustment of users to accommodate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29846 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint/Miscompilation.cpp')
-rw-r--r--tools/bugpoint/Miscompilation.cpp26
1 files changed, 22 insertions, 4 deletions
diff --git a/tools/bugpoint/Miscompilation.cpp b/tools/bugpoint/Miscompilation.cpp
index 0fe14e34ae..7660a83d30 100644
--- a/tools/bugpoint/Miscompilation.cpp
+++ b/tools/bugpoint/Miscompilation.cpp
@@ -776,7 +776,12 @@ static bool TestCodeGenerator(BugDriver &BD, Module *Test, Module *Safe) {
CleanupAndPrepareModules(BD, Test, Safe);
sys::Path TestModuleBC("bugpoint.test.bc");
- TestModuleBC.makeUnique();
+ std::string ErrMsg;
+ if (TestModuleBC.makeUnique(true, &ErrMsg)) {
+ std::cerr << BD.getToolName() << "Error making unique filename: "
+ << ErrMsg << "\n";
+ exit(1);
+ }
if (BD.writeProgramToFile(TestModuleBC.toString(), Test)) {
std::cerr << "Error writing bytecode to `" << TestModuleBC << "'\nExiting.";
exit(1);
@@ -785,7 +790,11 @@ static bool TestCodeGenerator(BugDriver &BD, Module *Test, Module *Safe) {
// Make the shared library
sys::Path SafeModuleBC("bugpoint.safe.bc");
- SafeModuleBC.makeUnique();
+ if (SafeModuleBC.makeUnique(true, &ErrMsg)) {
+ std::cerr << BD.getToolName() << "Error making unique filename: "
+ << ErrMsg << "\n";
+ exit(1);
+ }
if (BD.writeProgramToFile(SafeModuleBC.toString(), Safe)) {
std::cerr << "Error writing bytecode to `" << SafeModuleBC << "'\nExiting.";
@@ -836,7 +845,12 @@ bool BugDriver::debugCodeGenerator() {
CleanupAndPrepareModules(*this, ToCodeGen, ToNotCodeGen);
sys::Path TestModuleBC("bugpoint.test.bc");
- TestModuleBC.makeUnique();
+ std::string ErrMsg;
+ if (TestModuleBC.makeUnique(true, &ErrMsg)) {
+ std::cerr << getToolName() << "Error making unique filename: "
+ << ErrMsg << "\n";
+ exit(1);
+ }
if (writeProgramToFile(TestModuleBC.toString(), ToCodeGen)) {
std::cerr << "Error writing bytecode to `" << TestModuleBC << "'\nExiting.";
@@ -846,7 +860,11 @@ bool BugDriver::debugCodeGenerator() {
// Make the shared library
sys::Path SafeModuleBC("bugpoint.safe.bc");
- SafeModuleBC.makeUnique();
+ if (SafeModuleBC.makeUnique(true, &ErrMsg)) {
+ std::cerr << getToolName() << "Error making unique filename: "
+ << ErrMsg << "\n";
+ exit(1);
+ }
if (writeProgramToFile(SafeModuleBC.toString(), ToNotCodeGen)) {
std::cerr << "Error writing bytecode to `" << SafeModuleBC << "'\nExiting.";