[PATCH] [lld] [LinkerScript] Implement semantics for simple sections mappings

Rui Ueyama ruiu at google.com
Sun Mar 8 20:26:10 PDT 2015


================
Comment at: include/lld/ReaderWriter/LinkerScript.h:759-760
@@ -745,1 +758,4 @@
 
+  const_iterator begin() const { return _outputSectionCommands.begin(); }
+  const_iterator end() const { return _outputSectionCommands.end(); }
+  StringRef name() const { return _sectionName; }
----------------
shankarke wrote:
> this could be simplified if you use lld::range.
This cannot be replaced with lld::range since these two methods allows us to directly use this class in range-based for loops. Also, don't use lld::range anymore. We cannot justify having that generic library only inside LLD.

================
Comment at: include/lld/ReaderWriter/LinkerScript.h:1159
@@ +1158,3 @@
+  /// scripts have been parsed.
+  void perform();
+
----------------
shankarke wrote:
> returns void ?
Returning void is fine. Don't make this function return std::error_code "just in case".

http://reviews.llvm.org/D8157

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list