[llvm-commits] [llvm] r170030 -	/llvm/trunk/lib/Support/YAMLTraits.cpp
    Richard Smith 
    richard at metafoo.co.uk
       
    Wed Dec 12 14:35:40 PST 2012
    
    
  
On Wed, Dec 12, 2012 at 2:24 PM, Eric Christopher <echristo at gmail.com> wrote:
> On Wed, Dec 12, 2012 at 2:14 PM, Nick Kledzik <kledzik at apple.com> wrote:
>> On Dec 12, 2012, at 1:50 PM, Eric Christopher wrote:
>> Seems to be inherently less portable? Perhaps changing the out parameter
>> instead?
>>
>> Why is this change less portable?  getAsUnsignedInteger() is defined to
>> have a reference parameter of type unsigned  long long.  I was passing it a
>> variable of type uint64_t, which caused build failures on system in which
>> uint64_t != unsigned long long.  Now yaml is using the correct type.
>
> I mention because it would have been just as easy to change the reference
> parameter than to change the uses here, but that said int64_t is guaranteed
> to be exactly 64-bits whereas long long is guaranteed to be at least
> 64-bits.
>
> Also, uint64_t is way easier to look at than unsigned long long. :)
Also, we don't require a C++11 compiler, and C++98 doesn't have a long long. ;-)
    
    
More information about the llvm-commits
mailing list