[llvm-commits] [llvm] r63677 - /llvm/trunk/lib/CodeGen/MachineFunction.cpp

Evan Cheng evan.cheng at apple.com
Tue Feb 3 16:29:54 PST 2009


On Feb 3, 2009, at 4:06 PM, Bill Wendling wrote:

> On Tue, Feb 3, 2009 at 3:21 PM, Evan Cheng <evan.cheng at apple.com>  
> wrote:
>> On Feb 3, 2009, at 2:55 PM, Bill Wendling wrote:
>>
>>> const DebugLocTuple &MachineFunction::getDebugLocTuple(DebugLoc  
>>> DL) {
>>
>> It doesn't have to return a reference since DebugLocTuple is light
>> weight. Also, this method should be const.
>>
> It's 3 unsigned ints, so it's not that small, but I don't really care
> that much. Fixed.

Thanks. MachineFunction owns the tuples, nothing else should modify  
them. Returning ref's means something else can mess with them (const  
can always be casted away).

Evan

>
>
> -bw
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list