[lld] r192170 - Move duplicate code in InputGraphs to the parent class.

Rui Ueyama ruiu at google.com
Mon Oct 7 23:15:31 PDT 2013


Unless this is a part of public interface or there's a class that want to
override this helper function now, it doesn't make sense to make this
virtual now. Making it a virtual function would not only incur runtime
performance penalty, but also give readers a wrong impression that the
method would actually be overriden by derived classes.

You can add virtual when you need it pretty easily.


On Mon, Oct 7, 2013 at 11:02 PM, Shankar Easwaran
<shankare at codeaurora.org>wrote:

> Derived classes may want to override that function need be.
>
>
> On 10/8/2013 12:59 AM, Rui Ueyama wrote:
>
>> Why? It's not overriden by anyone.
>>
>>
>> On Mon, Oct 7, 2013 at 10:58 PM, Shankar Easwaran
>> <shankare at codeaurora.org>**wrote:
>>
>>    On 10/8/2013 12:52 AM, Rui Ueyama wrote:
>>>
>>> +307  error_code readFile(const LinkingContext &ctx, raw_ostream
>>> &diagnostics);
>>>
>>>   Make this virtual.
>>>
>>> Thanks
>>>
>>> Shankar Easwaran
>>>
>>> --
>>> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
>>> hosted by the Linux Foundation
>>>
>>>
>>>
>
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted
> by the Linux Foundation
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131007/dc063739/attachment.html>


More information about the llvm-commits mailing list