[PATCH] D13703: [ELF2/Linkerscript] Skip semicolon in linker directives parsing
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 13 11:47:40 PDT 2015
ruiu added a comment.
LGTM with a nit.
https://sourceware.org/binutils/docs/ld/Script-Format.html says that "You may separate commands using semicolons", so it seems optional. Probably single ';' at beginning of file is valid because of the same reason that empty statement is accepted in C.
================
Comment at: ELF/LinkerScript.cpp:62-65
@@ -61,3 +61,6 @@
StringRef Tok = next();
- if (Tok == "ENTRY") {
+ if (Tok == ";") {
+ continue;
+ }
+ else if (Tok == "ENTRY") {
readEntry();
----------------
if (Tok == ";")
continue;
if (Tok == "ENTRY") {
Repository:
rL LLVM
http://reviews.llvm.org/D13703
More information about the llvm-commits
mailing list