[llvm] r194957 - DebugLoc defines LineCol as 32 bit in comment but unsigned in code.

Yaron Keren yaron.keren at gmail.com
Wed Nov 20 05:07:25 PST 2013


OK, sure.

Should I add to the documentation or comment somewhere that "LLVM and Clang
generally assume that int and unsigned are both 32-bits." ?

Since uint32_t is used in many places in the code it's not an obvious
assumption.

Yaron



2013/11/20 Chris Lattner <clattner at apple.com>

>
> On Nov 19, 2013, at 11:52 AM, Yaron Keren <yaron.keren at gmail.com> wrote:
>
> Hi Chris,
>
> No, I don't have such system.
>
> While reading the code for another purpose I noted the discrepancy between
> the comment saying LineCol is 32 bit, the type itself and the get column
> method which will completely fail with non 32-bit unsigned.
>
> I'm sure there are more problems - one less to go!
>
>
> Ok, but what I’m saying is: please do not file bugs or change the code to
> make this happen.  Fixing problems for theoretical architectures is not a
> good use of time, and code churn for no reason is bad.
>
> -Chris
>
>
>
> Yaron
>
>
>
> 2013/11/19 Chris Lattner <clattner at apple.com>
>
>>
>> On Nov 17, 2013, at 1:47 AM, Yaron Keren <yaron.keren at gmail.com> wrote:
>>
>> > Author: yrnkrn
>> > Date: Sun Nov 17 03:47:39 2013
>> > New Revision: 194957
>> >
>> > URL: http://llvm.org/viewvc/llvm-project?rev=194957&view=rev
>> > Log:
>> > DebugLoc defines LineCol as 32 bit in comment but unsigned in code.
>> > This patch modifies LineCol to be a uint32_t.
>> >
>> > See http://llvm.org/bugs/show_bug.cgi?id=17957
>>
>> Are you really trying to build LLVM on a system where “unsigned” is
>> 64-bits?  You’re going to run into pervasive problems, and it isn’t clear
>> to me that fixing them piecemeal is going to work.  LLVM and Clang
>> generally assume that int and unsigned are both 32-bits.
>>
>> -Chris
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131120/52a01298/attachment.html>


More information about the llvm-commits mailing list