[llvm-commits] [llvm] r93777 - /llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp

Chris Lattner clattner at apple.com
Tue Jan 19 10:02:22 PST 2010


On Jan 19, 2010, at 8:48 AM, Daniel Dunbar wrote:
> Why not return a reference and define this problem away?

A better question is "why don't we have a decent C++ refactoring tool  
that wouldn't have done this in the first place"?

Answering your question, I've come to really dislike C++ references,  
in my ideal little world they never would have been added to C++.   
Having to remember whether something is a pointer or reference seems  
pretty inessential to solving real problems.

-Chris


>
> - Daniel
>
> On Mon, Jan 18, 2010 at 2:07 PM, Chris Lattner <clattner at apple.com>  
> wrote:
>>
>> On Jan 18, 2010, at 2:01 PM, Jim Grosbach wrote:
>>
>>> Author: grosbach
>>> Date: Mon Jan 18 16:01:39 2010
>>> New Revision: 93777
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=93777&view=rev
>>> Log:
>>> Minor cleanup for jump table printing. Need a reference, not a
>>> pointer, for
>>> printing via <<. Otherwise we just print the pointer value.
>>
>> My bug, sorry about that, thanks for fixing it!
>>
>> -Chris
>>
>>>
>>> Modified:
>>>    llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
>>>
>>> Modified: llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp?rev=93777&r1=93776&r2=93777&view=diff
>>>
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> =
>>> = 
>>> = 
>>> ====================================================================
>>> --- llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp  
>>> (original)
>>> +++ llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp Mon Jan
>>> 18 16:01:39 2010
>>> @@ -968,7 +968,7 @@
>>>     else if (HalfWordOffset)
>>>       O << MAI->getData16bitsDirective();
>>>     if (ByteOffset || HalfWordOffset) {
>>> -      O << '(' << GetMBBSymbol(MBB->getNumber());
>>> +      O << '(' << *GetMBBSymbol(MBB->getNumber());
>>>       O << "-" << MAI->getPrivateGlobalPrefix() << "JTI" <<
>>> getFunctionNumber()
>>>         << '_' << JTI << '_' << MO2.getImm() << ")/2";
>>>     } else {
>>>
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>> _______________________________________________
>> 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