[PATCH] D38239: [ELF] - Define linkerscript symbols early.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 14 01:11:40 PST 2017


grimar added inline comments.


================
Comment at: ELF/LinkerScript.cpp:178
+      // underlying expression and temporarily swap it with dummy one.
+      SaveAndRestore<Expr> R(Cmd->Expression, [] { return ExprValue(0); });
+      handleAssignment(Cmd);
----------------
ruiu wrote:
> Please avoid using some rarely used magical RAII class.
Ok. Is this approach to swap/restore the expression looks fine for you in general ? 
I feel it is a bit tricky though helps to simplify things.


https://reviews.llvm.org/D38239





More information about the llvm-commits mailing list