Use error() instead of fatal() to handle file open error.

llvm-svn: 292090
This commit is contained in:
Rui Ueyama
2017-01-16 01:07:19 +00:00
parent 6f303fe2f4
commit c9807c3370

View File

@@ -122,8 +122,9 @@ void elf::writeMapFile(ArrayRef<OutputSectionBase *> OutputSections) {
std::error_code EC;
raw_fd_ostream OS(Config->MapFile, EC, sys::fs::F_None);
if (EC)
fatal("cannot open " + Config->MapFile + ": " + EC.message());
writeMapFile2<ELFT>(OS, OutputSections);
error("cannot open " + Config->MapFile + ": " + EC.message());
else
writeMapFile2<ELFT>(OS, OutputSections);
}
template void elf::writeMapFile<ELF32LE>(ArrayRef<OutputSectionBase *>);