[llvm-commits] [llvm] r140316 - /llvm/trunk/lib/Target/Mips/MipsMCSymbolRefExpr.cpp

Akira Hatanaka ahatanak at gmail.com
Thu Sep 22 11:31:48 PDT 2011


Never mind, I fixed this in r140325.
I think this looks better.

On Thu, Sep 22, 2011 at 11:17 AM, Akira Hatanaka <ahatanak at gmail.com> wrote:
> I am not opposed to making this change, but is this needed to conform
> to LLVM's calling convention? I do see several places (not in Mips's
> directory, but in other targets) in which if statement is contained in
> one line. Is this a bad coding style?
>
> On Thu, Sep 22, 2011 at 10:57 AM, Bruno Cardoso Lopes
> <bruno.cardoso at gmail.com> wrote:
>> Hi Akira,
>>
>> On Thu, Sep 22, 2011 at 10:44 AM, Akira Hatanaka <ahatanak at gmail.com> wrote:
>>> Author: ahatanak
>>> Date: Thu Sep 22 12:44:37 2011
>>> New Revision: 140316
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=140316&view=rev
>>> Log:
>>> Print three closing parentheses when Kind is either VK_Mips_GPOFF_HI or
>>> VK_Mips_GPOFF_LO.
>>>
>>>
>>>
>>> Modified:
>>>    llvm/trunk/lib/Target/Mips/MipsMCSymbolRefExpr.cpp
>>>
>>> Modified: llvm/trunk/lib/Target/Mips/MipsMCSymbolRefExpr.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsMCSymbolRefExpr.cpp?rev=140316&r1=140315&r2=140316&view=diff
>>> ==============================================================================
>>> --- llvm/trunk/lib/Target/Mips/MipsMCSymbolRefExpr.cpp (original)
>>> +++ llvm/trunk/lib/Target/Mips/MipsMCSymbolRefExpr.cpp Thu Sep 22 12:44:37 2011
>>> @@ -48,8 +48,8 @@
>>>     OS << Offset;
>>>   }
>>>
>>> -  if (Kind != VK_Mips_None)
>>> -    OS << ')';
>>> +  if (Kind == VK_Mips_GPOFF_HI || Kind == VK_Mips_GPOFF_LO) OS << ")))";
>>> +  else if (Kind != VK_Mips_None)                            OS << ')';
>>>  }
>>
>> Please place the "OS << ..."s in lines following the conditions.
>>
>> --
>> Bruno Cardoso Lopes
>> http://www.brunocardoso.cc
>>
>




More information about the llvm-commits mailing list