Displaying 4 results from an estimated 4 matches for "allocacount".
Did you mean:
alloc_count
2008 Apr 20
0
[LLVMdev] Reference Manual Clarifications 2
Am Samstag, den 19.04.2008, 16:24 -0700 schrieb Jon Sargeant:
> First, I can assign -1 to
> the count to indicate an invalid or unknown value.
This is a C-ism. In a language that supports discriminated unions well,
you'd do something like
type AllocaCount = Invalid | Unknown | Known int
(where Invalid, Unknown and Known are the constants that do the
distinction between union variants).
> Second, if I attempt
> to allocate a negative count, I can print an assertion failure and abort
> the program. Had I interpreted the count as an unsign...
2008 Apr 19
3
[LLVMdev] Reference Manual Clarifications 2
Chris Lattner wrote:
> On Apr 19, 2008, at 3:27 PM, Jon Sargeant wrote:
>>>> Regarding malloc and alloca, I realized that the size is unsigned,
>>>> so a
>>>> negative value for NumElements is impossible. I suggest replacing
>>>> "it
>>>> is the number of elements allocated" with "it is the UNSIGNED number
2008 Apr 20
3
[LLVMdev] Reference Manual Clarifications 2
...z wrote:
> Am Samstag, den 19.04.2008, 16:24 -0700 schrieb Jon Sargeant:
>> First, I can assign -1 to
>> the count to indicate an invalid or unknown value.
>
> This is a C-ism. In a language that supports discriminated unions well,
> you'd do something like
> type AllocaCount = Invalid | Unknown | Known int
> (where Invalid, Unknown and Known are the constants that do the
> distinction between union variants).
Not necessarily. Using -1 for an invalid integer is analogous to using
null for an invalid pointer.
>> Second, if I attempt
>> to allocate...
2008 Apr 21
0
[LLVMdev] Reference Manual Clarifications 2
...19.04.2008, 16:24 -0700 schrieb Jon Sargeant:
> >> First, I can assign -1 to
> >> the count to indicate an invalid or unknown value.
> >
> > This is a C-ism. In a language that supports discriminated unions well,
> > you'd do something like
> > type AllocaCount = Invalid | Unknown | Known int
> > (where Invalid, Unknown and Known are the constants that do the
> > distinction between union variants).
>
> Not necessarily. Using -1 for an invalid integer is analogous to using
> null for an invalid pointer.
It is indeed analogous, and...