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

Eugene Leviant via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 11 04:14:25 PDT 2016


evgeny777 added inline comments.

================
Comment at: ELF/LinkerScript.cpp:222
@@ +221,3 @@
+  bool IsNew;
+  std::tie(Current, IsNew) = Factory.create(I, OutputName);
+  Current->addSection(I);
----------------
I suggest not using Current here, because it is not needed outside of addOrphan. Let's minimize side effects:

```
OutputSectionBase<ELFT> *Orphan;
bool IsNew;
std::tie(Orphan, IsNew) = Facrory.Create(...);
// ...
```



https://reviews.llvm.org/D23352





More information about the llvm-commits mailing list