[PATCH] D23352: [ELF] - Linkerscript: implemented simple heuristic for placing orphan sections.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 11 06:59:01 PDT 2016
grimar added inline comments.
================
Comment at: ELF/LinkerScript.cpp:222
@@ +221,3 @@
+ bool IsNew;
+ std::tie(Current, IsNew) = Factory.create(I, OutputName);
+ Current->addSection(I);
----------------
evgeny777 wrote:
> 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(...);
> // ...
> ```
>
Sounds reasonable.
https://reviews.llvm.org/D23352
More information about the llvm-commits
mailing list