Update for llvm change.

llvm-svn: 317657
This commit is contained in:
Rafael Espindola 2017-11-08 01:50:34 +00:00
parent 0d7a38a81d
commit 5f903f3848
3 changed files with 6 additions and 5 deletions

View File

@ -314,8 +314,8 @@ void Writer::run() {
writeMapFile(OutputSections);
if (auto EC = Buffer->commit())
fatal("failed to write the output file: " + EC.message());
if (auto E = Buffer->commit())
fatal("failed to write the output file: " + toString(std::move(E)));
}
static StringRef getOutputSection(StringRef Name) {

View File

@ -242,8 +242,8 @@ template <class ELFT> void Writer<ELFT>::run() {
if (errorCount())
return;
if (auto EC = Buffer->commit())
error("failed to write to the output file: " + EC.message());
if (auto E = Buffer->commit())
error("failed to write to the output file: " + toString(std::move(E)));
}
// Initialize Out members.

View File

@ -1535,7 +1535,8 @@ llvm::Error MachOFileLayout::writeBinary(StringRef path) {
return ec;
writeSectionContent();
writeLinkEditContent();
fob->commit();
if (Error E = fob->commit())
return E;
return llvm::Error::success();
}