[LLVMdev] tblgen internals
Garrison Venn
gvenn.cfe.dev at gmail.com
Mon Dec 13 05:50:59 PST 2010
Of course it would help if I added the patch file. :-)
On Dec 13, 2010, at 8:49, Garrison Venn wrote:
> The attached patch removes Record::createRecord(...) and its uses from trunk, and includes
> previous code style fixes.
>
> On Dec 12, 2010, at 21:52, Garrison Venn wrote:
>
>> ...
>>
>>>
>>> Another random question: why is createRecord better than using "new Record"? If createRecord is better, it would be good to make the Record ctor private so the code doesn't evolve into sometimes using one and sometimes using the other.
>>
>> This was another syntactic hack. I personally prefer the factory approach, but I cannot
>> as it stands get rid of the explicit Record constructor because of MultiClass. It has member
>> variable of type Record and constructs this member directly using the Record constructor.
>> It therefore does not need the allocation provided by createRecord. I could push the Record
>> constructor to protected or private and make MultiClass a friend. This is ugly so I think I should
>> drop the factory method in favor of new Record. Like I said the factory method is mainly sugar
>> anyway.
>>
>> I'm assuming your ok with dropping the RecordKeeper::createRecord(...). I'll send that
>> patch tomorrow.
>>
>> ...
>>> Some minor coding style things:
>>>
>>> ...
>>
>>> -Chris
>>>
>>
>> <RecordKeeper.4.patch>
>
> I think you will be ok with this.
>
> Garrison
>
> PS: Standalone patch with respect to trunk 121697
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RecordKeeper.5.patch
Type: application/octet-stream
Size: 6406 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101213/c5530b10/attachment.obj>
More information about the llvm-dev
mailing list