// Rerun the compiler, capturing any error messages to print them.
SmallString<128> ErrorFilename;
int ErrorFD;
- error_code EC = sys::fs::unique_file("bugpoint.program_error_messages",
- ErrorFD, ErrorFilename);
+ error_code EC = sys::fs::createTemporaryFile(
+ "bugpoint.program_error_messages", "", ErrorFD, ErrorFilename);
if (EC) {
errs() << "Error making unique filename: " << EC.message() << "\n";
exit(1);
SmallString<128> UniqueFile;
error_code EC =
- sys::fs::unique_file(Bitcode + "-%%%%%%%" + Suffix, UniqueFile);
+ sys::fs::createUniqueFile(Bitcode + "-%%%%%%%" + Suffix, UniqueFile);
if (EC) {
errs() << "Error making unique filename: " << EC.message() << "\n";
exit(1);
SmallString<128> OutputBinary;
error_code EC =
- sys::fs::unique_file(ProgramFile+ "-%%%%%%%.gcc.exe", OutputBinary);
+ sys::fs::createUniqueFile(ProgramFile + "-%%%%%%%.gcc.exe", OutputBinary);
if (EC) {
errs() << "Error making unique filename: " << EC.message() << "\n";
exit(1);
const std::vector<std::string> &ArgsForGCC,
std::string &Error) {
SmallString<128> UniqueFilename;
- error_code EC = sys::fs::unique_file(InputFile + "-%%%%%%%" + LTDL_SHLIB_EXT,
- UniqueFilename);
+ error_code EC = sys::fs::createUniqueFile(
+ InputFile + "-%%%%%%%" + LTDL_SHLIB_EXT, UniqueFilename);
if (EC) {
errs() << "Error making unique filename: " << EC.message() << "\n";
exit(1);