[llvm-dev] [llvm] r259255 - Need #include <cstdint> for uint64_t
Craig Topper via llvm-dev
llvm-dev at lists.llvm.org
Fri Jan 29 17:08:23 PST 2016
DataTypes.h is transitively included through a lot of very common includes
already. So its entirely possible AMDGPU and Hexagon are really including
it.
On Fri, Jan 29, 2016 at 5:02 PM, mats petersson <mats at planetcatfish.com>
wrote:
> Sounds to me like including `DataTypes.h` would be the right choice, since
> it will include `stdint.h` if it exists - and error if it doesn't, along
> with a few other things. And it guarantees that the entire compiler uses
> the SAME definition, rather than, potentially, using different variants of
> the "same" type in different places.
>
> I'd argue the other way around, that you probably should fix the other
> bits that use `cstdint` to use `DataTypes.h`.
>
> --
> Mats
>
> On 30 January 2016 at 00:33, Matthias Braun via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>> Oh I did not know about DataTypes.h. However given that there are already
>> two other files in llvm (in the AMDGPU and Hexagon targets) that #include
>> <cstdint> since 2014, maybe we can loosen the requirement for DataTypes.h
>> nowadays as #include <cstdint> seems to be working everywhere?
>>
>> - Matthias
>>
>> On Jan 29, 2016, at 3:06 PM, Craig Topper <craig.topper at gmail.com> wrote:
>>
>> I think you may really want include/llvm/Support/DataTypes.h
>>
>> On Fri, Jan 29, 2016 at 2:35 PM, Matthias Braun via llvm-commits <
>> llvm-commits at lists.llvm.org> wrote:
>>
>>> Author: matze
>>> Date: Fri Jan 29 16:35:29 2016
>>> New Revision: 259255
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=259255&view=rev
>>> Log:
>>> Need #include <cstdint> for uint64_t
>>>
>>> Modified:
>>> llvm/trunk/lib/IR/AttributeImpl.h
>>>
>>> Modified: llvm/trunk/lib/IR/AttributeImpl.h
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/AttributeImpl.h?rev=259255&r1=259254&r2=259255&view=diff
>>>
>>> ==============================================================================
>>> --- llvm/trunk/lib/IR/AttributeImpl.h (original)
>>> +++ llvm/trunk/lib/IR/AttributeImpl.h Fri Jan 29 16:35:29 2016
>>> @@ -19,8 +19,9 @@
>>> #include "llvm/ADT/FoldingSet.h"
>>> #include "llvm/IR/Attributes.h"
>>> #include "llvm/Support/TrailingObjects.h"
>>> -#include <string>
>>> #include <climits>
>>> +#include <cstdint>
>>> +#include <string>
>>>
>>> namespace llvm {
>>>
>>>
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>>
>>
>>
>>
>> --
>> ~Craig
>>
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>>
>
--
~Craig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160129/f33c47bf/attachment.html>
More information about the llvm-dev
mailing list