[lld] r201129 - [Mips] Handle R_MIPS_COPY relocation.

Simon Atanasyan simon at atanasyan.com
Mon Feb 10 22:44:53 PST 2014


On Tue, Feb 11, 2014 at 9:50 AM, David Blaikie <dblaikie at gmail.com> wrote:
>
> On Mon, Feb 10, 2014 at 9:34 PM, Simon Atanasyan <simon at atanasyan.com>
> wrote:
>>
>> Author: atanasyan
>> Date: Mon Feb 10 23:34:02 2014
>> New Revision: 201129
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=201129&view=rev

[...]

>> +bool MipsLinkingContext::isDynamicRelocation(const DefinedAtom &,
>> +                                             const Reference &r) const {
>> +  if (r.kindNamespace() != Reference::KindNamespace::ELF)
>> +    return false;
>> +
>> +  switch (r.kindValue()) {
>> +  case llvm::ELF::R_MIPS_COPY:
>> +    return true;
>> +  default:
>> +    return false;
>> +  }
>
>
> This switch looks like it could be more easily written as:
>
>   return r.kindValue() == llvm::ELF::R_MIPS_COPY;
>
> for what it's worth.

You are right. Fixed at r201131.

-- 
Simon Atanasyan



More information about the llvm-commits mailing list