[lld] r292090 - Use error() instead of fatal() to handle file open error.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 15 17:07:19 PST 2017


Author: ruiu
Date: Sun Jan 15 19:07:19 2017
New Revision: 292090

URL: http://llvm.org/viewvc/llvm-project?rev=292090&view=rev
Log:
Use error() instead of fatal() to handle file open error.

Modified:
    lld/trunk/ELF/MapFile.cpp

Modified: lld/trunk/ELF/MapFile.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/MapFile.cpp?rev=292090&r1=292089&r2=292090&view=diff
==============================================================================
--- lld/trunk/ELF/MapFile.cpp (original)
+++ lld/trunk/ELF/MapFile.cpp Sun Jan 15 19:07:19 2017
@@ -122,8 +122,9 @@ void elf::writeMapFile(ArrayRef<OutputSe
   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 *>);




More information about the llvm-commits mailing list