From 626e0b08ac3654e2292fe62aa9a2426395deee33 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Fri, 2 Sep 2016 18:19:00 +0000 Subject: [PATCH] Add comments. llvm-svn: 280515 --- lld/ELF/LinkerScript.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index e239b89..493e041 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -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); -- 2.7.4