[PATCH] D38401: [ELF] Fix incorrect exit status bug exposed by D38283
ben via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 29 05:53:33 PDT 2017
bd1976llvm created this revision.
Herald added a subscriber: emaste.
Despite emitting an error the return code is 0 if we can not write to the output file.
https://reviews.llvm.org/D38283 meant that we are now hitting this case.
https://reviews.llvm.org/D38401
Files:
ELF/Writer.cpp
Index: ELF/Writer.cpp
===================================================================
--- ELF/Writer.cpp
+++ ELF/Writer.cpp
@@ -246,6 +246,8 @@
if (auto EC = Buffer->commit())
error("failed to write to the output file: " + EC.message());
+ if (ErrorCount)
+ return;
// Flush the output streams and exit immediately. A full shutdown
// is a good test that we are keeping track of all allocated memory,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38401.117129.patch
Type: text/x-patch
Size: 427 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170929/32be2fb5/attachment.bin>
More information about the llvm-commits
mailing list