[llvm-commits] [llvm] r170030 - /llvm/trunk/lib/Support/YAMLTraits.cpp

Eric Christopher echristo at gmail.com
Wed Dec 12 14:24:16 PST 2012


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. :)

-eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121212/36c5e228/attachment.html>


More information about the llvm-commits mailing list