[PATCH] D23768: [ELF] Linkerscript: eliminate LayoutInputSection

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 30 13:02:23 PDT 2016


ruiu added inline comments.

================
Comment at: ELF/InputSection.h:33
@@ -32,1 +32,3 @@
 
+class InputSectionData {
+public:
----------------
Please write a comment for this class. It should describe why we need this class (because we want to have a base class which is not a template class).

================
Comment at: ELF/InputSection.h:46
@@ +45,3 @@
+  bool Live;
+  bool Compressed;
+  // If a section is compressed, this vector has uncompressed section data.
----------------
rafael wrote:
> Move the "Usef for garbage collection" comment to the same line as Live or add a newline after it.
Yup. That's what I meant.

================
Comment at: ELF/LinkerScript.cpp:209
@@ +208,3 @@
+
+    for (InputSectionBase<ELFT> *S : V)
+      if (S->OutSec == nullptr) {
----------------
Needs a comment. What are you trying to do with this loop?

================
Comment at: ELF/LinkerScript.cpp:282
@@ +281,3 @@
+  // are in the beginning of output section the value of 'D'
+  // is nullptr.
+  auto AssignSuccessors = [&](InputSectionData *D) {
----------------
Thank you for the comment. I think I now understand what it does.


https://reviews.llvm.org/D23768





More information about the llvm-commits mailing list