summaryrefslogtreecommitdiffstats
path: root/llvm/tools/bugpoint/Miscompilation.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-07-05 20:14:52 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-07-05 20:14:52 +0000
commit155cf0f3a6843314527ce342aa1bc32517eeab3c (patch)
tree1b0ff20dc28ab7d4356eff944b81cc52a8bf0467 /llvm/tools/bugpoint/Miscompilation.cpp
parent43318aa17c6dfd235119a2014f1c69df7e49b600 (diff)
downloadbcm5719-llvm-155cf0f3a6843314527ce342aa1bc32517eeab3c.tar.gz
bcm5719-llvm-155cf0f3a6843314527ce342aa1bc32517eeab3c.zip
Use sys::fs::createTemporaryFile.
llvm-svn: 185719
Diffstat (limited to 'llvm/tools/bugpoint/Miscompilation.cpp')
-rw-r--r--llvm/tools/bugpoint/Miscompilation.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/tools/bugpoint/Miscompilation.cpp b/llvm/tools/bugpoint/Miscompilation.cpp
index 73b5cd1fe84..5574303321c 100644
--- a/llvm/tools/bugpoint/Miscompilation.cpp
+++ b/llvm/tools/bugpoint/Miscompilation.cpp
@@ -928,8 +928,8 @@ static bool TestCodeGenerator(BugDriver &BD, Module *Test, Module *Safe,
SmallString<128> TestModuleBC;
int TestModuleFD;
- error_code EC = sys::fs::unique_file("bugpoint.test-%%%%%%%.bc", TestModuleFD,
- TestModuleBC);
+ error_code EC = sys::fs::createTemporaryFile("bugpoint.test", "bc",
+ TestModuleFD, TestModuleBC);
if (EC) {
errs() << BD.getToolName() << "Error making unique filename: "
<< EC.message() << "\n";
@@ -947,8 +947,8 @@ static bool TestCodeGenerator(BugDriver &BD, Module *Test, Module *Safe,
// Make the shared library
SmallString<128> SafeModuleBC;
int SafeModuleFD;
- EC = sys::fs::unique_file("bugpoint.safe-%%%%%%%.bc", SafeModuleFD,
- SafeModuleBC);
+ EC = sys::fs::createTemporaryFile("bugpoint.safe", "bc", SafeModuleFD,
+ SafeModuleBC);
if (EC) {
errs() << BD.getToolName() << "Error making unique filename: "
<< EC.message() << "\n";
@@ -1022,8 +1022,8 @@ bool BugDriver::debugCodeGenerator(std::string *Error) {
SmallString<128> TestModuleBC;
int TestModuleFD;
- error_code EC = sys::fs::unique_file("bugpoint.test-%%%%%%%.bc", TestModuleFD,
- TestModuleBC);
+ error_code EC = sys::fs::createTemporaryFile("bugpoint.test", "bc",
+ TestModuleFD, TestModuleBC);
if (EC) {
errs() << getToolName() << "Error making unique filename: "
<< EC.message() << "\n";
@@ -1040,8 +1040,8 @@ bool BugDriver::debugCodeGenerator(std::string *Error) {
// Make the shared library
SmallString<128> SafeModuleBC;
int SafeModuleFD;
- EC = sys::fs::unique_file("bugpoint.safe-%%%%%%%.bc", SafeModuleFD,
- SafeModuleBC);
+ EC = sys::fs::createTemporaryFile("bugpoint.safe", "bc", SafeModuleFD,
+ SafeModuleBC);
if (EC) {
errs() << getToolName() << "Error making unique filename: "
<< EC.message() << "\n";
OpenPOWER on IntegriCloud