[PATCH] Convert other drivers to use WrapperNode.
Rui Ueyama
ruiu at google.com
Thu Jan 8 13:55:38 PST 2015
On Fri, Jan 9, 2015 at 6:35 AM, Shankar Easwaran <shankare at codeaurora.org>
wrote:
>
> On 1/8/2015 12:10 PM, Rui Ueyama wrote:
>
>> ================
>> Comment at: include/lld/ReaderWriter/ELFLinkingContext.h:293-313
>> @@ -292,1 +292,23 @@
>> + /// \brief The attributes class provides a way for a input file to
>> look into
>> + /// all the positional attributes that were specified in the command
>> line.
>> + /// There are few positional operators and the number of arguments to
>> the
>> + /// ELFFileNode class keeps growing. This achieves code to be clean as
>> well.
>> + class Attributes {
>> + public:
>> + Attributes()
>> + : _isWholeArchive(false), _asNeeded(false),
>> _isDashlPrefix(false),
>> + _isSysRooted(false) {}
>> + void setWholeArchive(bool isWholeArchive) {
>> + _isWholeArchive = isWholeArchive;
>> + }
>> + void setAsNeeded(bool asNeeded) { _asNeeded = asNeeded; }
>> + void setDashlPrefix(bool isDashlPrefix) { _isDashlPrefix =
>> isDashlPrefix; }
>> + void setSysRooted(bool isSysRooted) { _isSysRooted = isSysRooted; }
>> +
>> + bool _isWholeArchive;
>> + bool _asNeeded;
>> + bool _isDashlPrefix;
>> + bool _isSysRooted;
>> + };
>> +
>> ----------------
>> shankarke wrote:
>>
>>> How is the attribute accessed from the file ? I didnt see a accessor
>>> function, am I missing some detail ?
>>>
>> 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.
>>
> Yeah, the context needs to have a map from file to attributes.
I think so. I'll revisit that once the refactoring is done.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150109/f9efb2c5/attachment.html>
More information about the llvm-commits
mailing list