summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Writer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/Writer.cpp')
-rw-r--r--lld/ELF/Writer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index f8f6215003b..c67567c7b26 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -163,6 +163,8 @@ template <class ELFT> void Writer<ELFT>::run() {
openFile(Config->OutputFile);
writeHeader();
writeSections();
+ if (HasError)
+ return;
fatal(Buffer->commit());
}
OpenPOWER on IntegriCloud