[lld] r280515 - Add comments.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 2 11:19:04 PDT 2016


Author: ruiu
Date: Fri Sep  2 13:19:00 2016
New Revision: 280515

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

Modified:
    lld/trunk/ELF/LinkerScript.cpp

Modified: lld/trunk/ELF/LinkerScript.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.cpp?rev=280515&r1=280514&r2=280515&view=diff
==============================================================================
--- lld/trunk/ELF/LinkerScript.cpp (original)
+++ lld/trunk/ELF/LinkerScript.cpp Fri Sep  2 13:19:00 2016
@@ -1232,6 +1232,10 @@ uint64_t static getConstant(StringRef S)
   return 0;
 }
 
+// Parses Tok as an integer. Returns true if successful.
+// It recognizes hexadecimal (prefixed with "0x" or suffixed with "H")
+// and decimal numbers. Decimal numbers may have "K" (kilo) or
+// "M" (mega) prefixes.
 static bool readInteger(StringRef Tok, uint64_t &Result) {
   if (Tok.startswith_lower("0x"))
     return !Tok.substr(2).getAsInteger(16, Result);




More information about the llvm-commits mailing list