[PATCH] D22617: [ELF] - Linkerscript: add InputSectionDescription command to LS parser.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 21 07:01:45 PDT 2016


ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.

LGTM with the change.


================
Comment at: ELF/LinkerScript.cpp:266
@@ -245,2 +265,3 @@
+  }
 
   // Add all other input sections, which are not listed in script.
----------------
grimar wrote:
> Afraid I am a bit lost in this puzzle :)
> Is that what you mean ?
> 
> ```
> static bool match(StringRef T, ArrayRef<StringRef> Pattern) {
>   for (StringRef S : Pattern)
>     if (globMatch(S, T))
>       return true;
>   return false;
> }
> ```
1. I want parameters of similar functions be ordered in a consistent way. However, your new function takes [Pattern Target] although globMatch takes [Target Pattern]
2. T is too short and doesn't convey it is a glob pattern rather.
3. Apparently Pattern is not a right name for ArrayRef<StringRef> that doesn't contain patterns

  static bool match(StringRef Pattern, ArrayRef<StringRef> Arr) {
    for (StringRef S : Arr)
      if (globMatch(Pattern, S))
        return true;
    return false;
  }


https://reviews.llvm.org/D22617





More information about the llvm-commits mailing list