<div dir="ltr"><div><div>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.<br><br></div>I'd argue the other way around, that you probably should fix the other bits that use `cstdint` to use `DataTypes.h`.<br><br>--<br></div>Mats<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 30 January 2016 at 00:33, Matthias Braun via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>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?</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>- Matthias</div></font></span><div><div class="h5"><br><div><blockquote type="cite"><div>On Jan 29, 2016, at 3:06 PM, Craig Topper <<a href="mailto:craig.topper@gmail.com" target="_blank">craig.topper@gmail.com</a>> wrote:</div><br><div><div dir="ltr">I think you may really want include/llvm/Support/DataTypes.h</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 29, 2016 at 2:35 PM, Matthias Braun via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: matze<br>
Date: Fri Jan 29 16:35:29 2016<br>
New Revision: 259255<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=259255&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=259255&view=rev</a><br>
Log:<br>
Need #include <cstdint> for uint64_t<br>
<br>
Modified:<br>
    llvm/trunk/lib/IR/AttributeImpl.h<br>
<br>
Modified: llvm/trunk/lib/IR/AttributeImpl.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/AttributeImpl.h?rev=259255&r1=259254&r2=259255&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/AttributeImpl.h?rev=259255&r1=259254&r2=259255&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/IR/AttributeImpl.h (original)<br>
+++ llvm/trunk/lib/IR/AttributeImpl.h Fri Jan 29 16:35:29 2016<br>
@@ -19,8 +19,9 @@<br>
 #include "llvm/ADT/FoldingSet.h"<br>
 #include "llvm/IR/Attributes.h"<br>
 #include "llvm/Support/TrailingObjects.h"<br>
-#include <string><br>
 #include <climits><br>
+#include <cstdint><br>
+#include <string><br>
<br>
 namespace llvm {<br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div>~Craig</div>
</div>
</div></blockquote></div><br></div></div></div><br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>