[PATCH] D22915: [ELF] - Linkerscript: implemented SIZEOF(section)
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 28 11:45:18 PDT 2016
ruiu added inline comments.
================
Comment at: ELF/LinkerScript.h:154
@@ -152,2 +153,3 @@
+ OutputSectionFactory<ELFT> *Factory = nullptr;
uintX_t Dot;
----------------
I don't think it's beautiful as you are holding a pointer to a factory just to get sizes of sections. Factory is too powerful to be here.
LinkerScript creates output sections. Why don't you save it instead?
Also, as I described in https://reviews.llvm.org/D22740, this is yet another example that you are accessing something other than Dot to evaluate expressions. I do not see a reason to handle Dot as a special case. If you like to pass all variables as parameters, why don't you pass it as a Expr's parameter?
https://reviews.llvm.org/D22915
More information about the llvm-commits
mailing list