mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
ThinLTOCodeGenerator: handle std::error_code instead of silently dropping it.
From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 269541
This commit is contained in:
parent
cd8ee7b56a
commit
a08e32bab1
@ -502,7 +502,11 @@ public:
|
||||
OS << OutputBuffer.getBuffer();
|
||||
}
|
||||
// Rename to final destination (hopefully race condition won't matter here)
|
||||
sys::fs::rename(TempFilename, EntryPath);
|
||||
EC = sys::fs::rename(TempFilename, EntryPath);
|
||||
if (EC) {
|
||||
errs() << "Error: " << EC.message() << "\n";
|
||||
report_fatal_error("ThinLTO: Can't rename temporary file " + TempFilename + " to " + EntryPath);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user