[PATCH] D17120: ELF: Implement the correct semantics of .[cd]tors.

Michael Spencer via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 10 19:25:54 PST 2016


Bigcheese added inline comments.

================
Comment at: ELF/OutputSections.cpp:802
@@ +801,3 @@
+    return false;
+  return S.drop_back(3).endswith("crtbegin");
+}
----------------
ruiu wrote:
> davide wrote:
> > Can you name '3' instead of using the magic number?
> We can name it SuffixLen or something like that, but it is probably too narrow. Added a comment instead.
3 is pretty obvious here, I can't think of a name that would provide any clarification. The function has a comment stating what the regex is.


http://reviews.llvm.org/D17120





More information about the llvm-commits mailing list