[lld] r282664 - Add comments.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 28 18:26:48 PDT 2016


Author: ruiu
Date: Wed Sep 28 20:26:48 2016
New Revision: 282664

URL: http://llvm.org/viewvc/llvm-project?rev=282664&view=rev
Log:
Add comments.

Modified:
    lld/trunk/ELF/Error.h

Modified: lld/trunk/ELF/Error.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Error.h?rev=282664&r1=282663&r2=282664&view=diff
==============================================================================
--- lld/trunk/ELF/Error.h (original)
+++ lld/trunk/ELF/Error.h Wed Sep 28 20:26:48 2016
@@ -6,6 +6,20 @@
 // License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
+//
+// In LLD, we have three levels of errors: fatal, error or warn.
+//
+// Fatal makes the program exit immediately with an error message.
+// You shouldn't use it except for reporting a corrupted input file.
+//
+// Error prints out an error message and set a global variable HasError
+// to true to record the fact that we met an error condition. It does
+// not exit, so it is safe for a lld-as-a-library use case. It is generally
+// useful because it can report more than one errors in a single run.
+//
+// Warn doesn't do anything but printing out a given message.
+//
+//===----------------------------------------------------------------------===//
 
 #ifndef LLD_ELF_ERROR_H
 #define LLD_ELF_ERROR_H




More information about the llvm-commits mailing list