Add comments.
authorRui Ueyama <ruiu@google.com>
Fri, 2 Sep 2016 18:19:00 +0000 (18:19 +0000)
committerRui Ueyama <ruiu@google.com>
Fri, 2 Sep 2016 18:19:00 +0000 (18:19 +0000)
llvm-svn: 280515

lld/ELF/LinkerScript.cpp

index e239b89..493e041 100644 (file)
@@ -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);