forked from OSchip/llvm-project
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
db8dd5515d
commit
2a16a5fae5
|
@ -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…
Reference in New Issue