[lld] r297850 - [ELF] - Linkerscript: make Dot public and remove getDot(). NFC.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 17 09:19:06 PDT 2017


This is just a regular object-oriented programming. The point of providing
accessors is to hide the implementation details from other parts of the
program. Inside the class, you can access the member variables (if you
can't access member variables in the same class, there's no way to access
them.)

On Fri, Mar 17, 2017 at 3:08 AM, George Rimar <grimar at accesssoftek.com>
wrote:

> > but in this case we have a fairly complicated `setDot` function, and we
> always set Dot via that function. So getDot works as a >guard to protect
> the direct access to that variable.
>
> We don't always use setDot(), If we would do, I would not remove setter.
> We have at least 4 direct assignemt to Dot in LinkerScriptBase​. May be we
> should change all asignents to go through
> setDot() ?
>
> George.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170317/e301888e/attachment.html>


More information about the llvm-commits mailing list