OSDN Git Service

Reland "[llvm-objcopy] Refactor llvm-objcopy to use reader and writer objects"
authorJake Ehrlich <jakehehrlich@google.com>
Fri, 26 Jan 2018 01:17:35 +0000 (01:17 +0000)
committerJake Ehrlich <jakehehrlich@google.com>
Fri, 26 Jan 2018 01:17:35 +0000 (01:17 +0000)
Added line to output the proper files in the output to binary case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@323489 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-objcopy/Object.cpp

index c7b4c1f..a1f5ff1 100644 (file)
@@ -1004,6 +1004,8 @@ void BinaryWriter::write() {
       continue;
     Section.accept(*SecWriter);
   }
+  if (auto E = BufPtr->commit())
+    reportError(File, errorToErrorCode(std::move(E)));
 }
 
 void BinaryWriter::finalize() {