[llvm] r205974 - Follow-up to r205973: change the return type to const MDNode*.

Adrian Prantl aprantl at apple.com
Thu Apr 10 11:10:08 PDT 2014


On Apr 10, 2014, at 11:04 AM, David Blaikie <dblaikie at gmail.com> wrote:

> On Thu, Apr 10, 2014 at 10:50 AM, Adrian Prantl <aprantl at apple.com> wrote:
>> Author: adrian
>> Date: Thu Apr 10 12:50:30 2014
>> New Revision: 205974
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=205974&view=rev
>> Log:
>> Follow-up to r205973: change the return type to const MDNode*.
> 
> It'd be helpful to explain (in the commit message, ideally) the
> motivation for changes like this.

That’s right. All uses cast the result to const MDNode*, so wrapping the result in a DIVariable seems like a waste of resources (then again wrapping an MDNode in a DIVariable should be close to zero cost, but this way the helper function at least matches its uses).

-- adrian



More information about the llvm-commits mailing list