<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jan 9, 2015 at 6:35 AM, Shankar Easwaran <span dir="ltr"><<a href="mailto:shankare@codeaurora.org" target="_blank">shankare@codeaurora.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
On 1/8/2015 12:10 PM, Rui Ueyama wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
================<br>
Comment at: include/lld/ReaderWriter/<u></u>ELFLinkingContext.h:293-313<br>
@@ -292,1 +292,23 @@<br>
+ /// \brief The attributes class provides a way for a input file to look into<br>
+ /// all the positional attributes that were specified in the command line.<br>
+ /// There are few positional operators and the number of arguments to the<br>
+ /// ELFFileNode class keeps growing. This achieves code to be clean as well.<br>
+ class Attributes {<br>
+ public:<br>
+ Attributes()<br>
+ : _isWholeArchive(false), _asNeeded(false), _isDashlPrefix(false),<br>
+ _isSysRooted(false) {}<br>
+ void setWholeArchive(bool isWholeArchive) {<br>
+ _isWholeArchive = isWholeArchive;<br>
+ }<br>
+ void setAsNeeded(bool asNeeded) { _asNeeded = asNeeded; }<br>
+ void setDashlPrefix(bool isDashlPrefix) { _isDashlPrefix = isDashlPrefix; }<br>
+ void setSysRooted(bool isSysRooted) { _isSysRooted = isSysRooted; }<br>
+<br>
+ bool _isWholeArchive;<br>
+ bool _asNeeded;<br>
+ bool _isDashlPrefix;<br>
+ bool _isSysRooted;<br>
+ };<br>
+<br>
----------------<br>
shankarke wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
How is the attribute accessed from the file ? I didnt see a accessor function, am I missing some detail ?<br>
</blockquote>
Well, that would be a question for you. :) The code was incomplete. I moved this piece of code from other file to this file. It's not new. Apparently we need more code to support these attributes but that's out of scope of this patch.<br>
</blockquote></div></div>
Yeah, the context needs to have a map from file to attributes.</blockquote><div><br></div><div>I think so. I'll revisit that once the refactoring is done.</div></div></div></div>