[PATCH] D23352: [ELF] - Linkerscript: implemented simple heuristic for placing orphan sections.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 29 16:09:29 PDT 2016


ruiu added inline comments.

================
Comment at: ELF/LinkerScript.cpp:290
@@ +289,3 @@
+  auto R = std::find_if(
+      ScriptConfig->Commands.rbegin(), ScriptConfig->Commands.rend(),
+      [&](std::unique_ptr<BaseCommand> &Base) {
----------------
Why rbegin and rend? If it doesn't have to be rbegin/rend, use begin/end.

================
Comment at: ELF/LinkerScript.cpp:302
@@ +301,3 @@
+  // with the same attributes we found earlier.
+  auto Pos = R != ScriptConfig->Commands.rend() ? R.base()
+                                                : ScriptConfig->Commands.end();
----------------
What is `base()`?


https://reviews.llvm.org/D23352





More information about the llvm-commits mailing list