projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b370f18
)
Add comments.
author
Rui Ueyama
<ruiu@google.com>
Fri, 2 Sep 2016 18:19:00 +0000
(18:19 +0000)
committer
Rui Ueyama
<ruiu@google.com>
Fri, 2 Sep 2016 18:19:00 +0000
(18:19 +0000)
llvm-svn: 280515
lld/ELF/LinkerScript.cpp
patch
|
blob
|
history
diff --git
a/lld/ELF/LinkerScript.cpp
b/lld/ELF/LinkerScript.cpp
index
e239b89
..
493e041
100644
(file)
--- 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);