[PATCH] D17242: [ELF] - Linkerscript KEEP command.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 18 12:01:39 PST 2016


ruiu added inline comments.

================
Comment at: ELF/LinkerScript.cpp:404
@@ -385,5 +403,3 @@
   while (!Error && !skip("}")) {
-    next(); // Skip input file name.
-    expect("(");
-    while (!Error && !skip(")"))
-      Script->Sections.push_back({OutSec, next()});
+    StringRef Cmd = next();
+    if (Cmd == "*") {
----------------
s/Cmd/Tok/.

(When we read a token, we don't know if it is a KEEP command or just a regular token.)

================
Comment at: ELF/LinkerScript.h:27
@@ -26,1 +26,3 @@
 class SectionRule {
+  friend class LinkerScript;
+
----------------
Please do not over use `friend`. No one but LinkerScript should use SectionRule, so you want to make the member public.


http://reviews.llvm.org/D17242





More information about the llvm-commits mailing list