mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-28 06:00:28 +00:00
[gold] Emit a diagnostic in case we fail to remove a file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263914 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cdda81445a
commit
443693f33a
@ -1289,10 +1289,14 @@ static ld_plugin_status all_symbols_read_hook(void) {
|
||||
|
||||
if (options::TheOutputType == options::OT_BC_ONLY ||
|
||||
options::TheOutputType == options::OT_DISABLE) {
|
||||
if (options::TheOutputType == options::OT_DISABLE)
|
||||
if (options::TheOutputType == options::OT_DISABLE) {
|
||||
// Remove the output file here since ld.bfd creates the output file
|
||||
// early.
|
||||
sys::fs::remove(output_name);
|
||||
std::error_code EC = sys::fs::remove(output_name);
|
||||
if (EC)
|
||||
message(LDPL_ERROR, "Failed to delete '%s': %s", output_name.c_str(),
|
||||
EC.message().c_str());
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user