r268113 - [Sema] Specify the underlying type for an enum. NFC.

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 29 16:59:50 PDT 2016


On Fri, Apr 29, 2016 at 6:02 PM, George Burgess IV
<george.burgess.iv at gmail.com> wrote:
> Right under the enum is an 11x11 static array of PromotedType. This change
> makes that array size go from 484 bytes to 121.

Ah, good to know. That sort of information would be useful in the
commit message (in case we ever do code archaeology for some reason).
Thank you for the explanation!

~Aaron

>
> On Fri, Apr 29, 2016 at 2:43 PM, Aaron Ballman <aaron at aaronballman.com>
> wrote:
>>
>> On Fri, Apr 29, 2016 at 5:32 PM, George Burgess IV via cfe-commits
>> <cfe-commits at lists.llvm.org> wrote:
>> > Author: gbiv
>> > Date: Fri Apr 29 16:32:53 2016
>> > New Revision: 268113
>> >
>> > URL: http://llvm.org/viewvc/llvm-project?rev=268113&view=rev
>> > Log:
>> > [Sema] Specify the underlying type for an enum. NFC.
>>
>> What is the benefit to this change?
>>
>> ~Aaron
>>
>> >
>> > Modified:
>> >     cfe/trunk/lib/Sema/SemaOverload.cpp
>> >
>> > Modified: cfe/trunk/lib/Sema/SemaOverload.cpp
>> > URL:
>> > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOverload.cpp?rev=268113&r1=268112&r2=268113&view=diff
>> >
>> > ==============================================================================
>> > --- cfe/trunk/lib/Sema/SemaOverload.cpp (original)
>> > +++ cfe/trunk/lib/Sema/SemaOverload.cpp Fri Apr 29 16:32:53 2016
>> > @@ -7257,7 +7257,7 @@ class BuiltinOperatorOverloadBuilder {
>> >      // (we could precompute SLL x UI for all known platforms, but it's
>> >      // better not to make any assumptions).
>> >      // We assume that int128 has a higher rank than long long on all
>> > platforms.
>> > -    enum PromotedType {
>> > +    enum PromotedType : int8_t {
>> >              Dep=-1,
>> >              Flt,  Dbl, LDbl,   SI,   SL,  SLL, S128,   UI,   UL,  ULL,
>> > U128
>> >      };
>> >
>> >
>> > _______________________________________________
>> > cfe-commits mailing list
>> > cfe-commits at lists.llvm.org
>> > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
>


More information about the cfe-commits mailing list