[cfe-commits] r165885 - /cfe/trunk/lib/CodeGen/CodeGenModule.cpp

Nico Weber thakis at chromium.org
Tue Oct 16 17:36:52 PDT 2012


On Wed, Oct 17, 2012 at 1:13 AM, John McCall <rjmccall at apple.com> wrote:
> On Oct 13, 2012, at 2:56 PM, Nico Weber wrote:
>> Author: nico
>> Date: Sat Oct 13 16:56:05 2012
>> New Revision: 165885
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=165885&view=rev
>> Log:
>> Simplify. Suggestion by Sean Silva.
>>
>> Modified:
>>    cfe/trunk/lib/CodeGen/CodeGenModule.cpp
>>
>> Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=165885&r1=165884&r2=165885&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
>> +++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Sat Oct 13 16:56:05 2012
>> @@ -2814,16 +2814,7 @@
>>   llvm::APInt Field0(32, StringRef(Uuidstr     , 8), 16);
>>   llvm::APInt Field1(16, StringRef(Uuidstr +  9, 4), 16);
>>   llvm::APInt Field2(16, StringRef(Uuidstr + 14, 4), 16);
>> -  llvm::APInt Field3Values[] = {
>> -    llvm::APInt(8, StringRef(Uuidstr + 19, 2), 16),
>> -    llvm::APInt(8, StringRef(Uuidstr + 21, 2), 16),
>> -    llvm::APInt(8, StringRef(Uuidstr + 24, 2), 16),
>> -    llvm::APInt(8, StringRef(Uuidstr + 26, 2), 16),
>> -    llvm::APInt(8, StringRef(Uuidstr + 28, 2), 16),
>> -    llvm::APInt(8, StringRef(Uuidstr + 30, 2), 16),
>> -    llvm::APInt(8, StringRef(Uuidstr + 32, 2), 16),
>> -    llvm::APInt(8, StringRef(Uuidstr + 34, 2), 16),
>> -  };
>> +  int Field3ValueOffsets[] = { 19, 21, 24, 26, 28, 30, 32, 34 };
>
> Might as well make it static const.

Might as well. r166080.



More information about the cfe-commits mailing list