COFF: Return an error_code directly.
authorRui Ueyama <ruiu@google.com>
Thu, 28 May 2015 20:39:29 +0000 (20:39 +0000)
committerRui Ueyama <ruiu@google.com>
Thu, 28 May 2015 20:39:29 +0000 (20:39 +0000)
llvm-svn: 238486

lld/COFF/Writer.cpp

index 3bfee4e..a93f80e 100644 (file)
@@ -371,9 +371,7 @@ std::error_code Writer::write(StringRef OutputPath) {
   writeHeader();
   writeSections();
   applyRelocations();
-  if (auto EC = Buffer->commit())
-    return EC;
-  return std::error_code();
+  return Buffer->commit();
 }
 
 } // namespace coff