forked from OSchip/llvm-project
parent
0d7a38a81d
commit
5f903f3848
|
@ -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) {
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue