[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineRelocation.h
Jeff Cohen
jeffc at jolt-lang.org
Sat Apr 21 10:29:38 PDT 2007
Reid Spencer wrote:
> Jeff,
>
>
> On Sat, 2007-04-21 at 11:29 -0500, Jeff Cohen wrote:
>
>> Changes in directory llvm/include/llvm/CodeGen:
>>
>> MachineRelocation.h updated: 1.12 -> 1.13
>> ---
>> Log message:
>>
>> Make enum-valued bitfield large enough to avoid interpretation as negative values in VC++.
>>
>> ---
>> Diffs of the changes: (+1 -1)
>>
>> MachineRelocation.h | 2 +-
>> 1 files changed, 1 insertion(+), 1 deletion(-)
>>
>>
>> Index: llvm/include/llvm/CodeGen/MachineRelocation.h
>> diff -u llvm/include/llvm/CodeGen/MachineRelocation.h:1.12 llvm/include/llvm/CodeGen/MachineRelocation.h:1.13
>> --- llvm/include/llvm/CodeGen/MachineRelocation.h:1.12 Sun Dec 10 20:19:29 2006
>> +++ llvm/include/llvm/CodeGen/MachineRelocation.h Sat Apr 21 11:29:37 2007
>> @@ -63,7 +63,7 @@
>> } Target;
>>
>> unsigned TargetReloType : 6; // The target relocation ID.
>> - AddressType AddrType : 3; // The field of Target to use.
>> + AddressType AddrType : 4; // The field of Target to use.
>>
>
> Can't we just make AddressType "unsigned" ? Surely VC++ won't treat
> something explicitly declared as unsigned as a signed quantity. Then we
> shouldn't need the extra bit, right?
>
> Reid.
Not without inserting a whole bunch of casts elsewhere. Unsigneds
cannot be assigned to enums.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20070421/de7ec57f/attachment.html>
More information about the llvm-commits
mailing list