diff options
Diffstat (limited to 'lld/ELF/Writer.cpp')
| -rw-r--r-- | lld/ELF/Writer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 7b9d9402ae8..3ac0191503b 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -261,7 +261,8 @@ template <class ELFT> void Writer<ELFT>::run() { writeBuildId(); if (HasError) return; - check(Buffer->commit()); + if (auto EC = Buffer->commit()) + error(EC, "failed to write to the output file"); } template <class ELFT> |

