<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 29, 2016 at 6:27 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"><div style="word-wrap:break-word"><div>The point I was trying to make here is that all things that DataTypes.h provides:</div><div>intXXX_t, uintXX_t, PRIdXX, INT64_MAX, HUGE_VAL, ssize_t ...</div><div>are all part of the C++11 standard and can be found in <cstdint>, <cmath> (except for ssize_t) so I wondered if there is still a need for llvm to provide this header since we require a C++11 compiler anyway nowadays.</div></div></blockquote><div><br></div><div>FWIW, I've thought about this too. cstdint and stdint.h are C++11, and I think that MSVC claims to support them. Maybe the next time that we bump up MSVC version it will work.</div><div><br></div><div>-- Sean Silva</div><div> </div><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><br></div><div>In each case I changed my file to use DataTypes.h now.</div><div><br></div><div>- Matthias</div><br><div><blockquote type="cite"><div><div class="h5"><div>On Jan 29, 2016, at 5:08 PM, Craig Topper via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:</div><br></div></div><div><div><div class="h5"><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">DataTypes.h is transitively included through a lot of very common includes already. So its entirely possible AMDGPU and Hexagon are really including it.</div><div class="gmail_extra" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br><div class="gmail_quote">On Fri, Jan 29, 2016 at 5:02 PM, mats petersson<span> </span><span dir="ltr"><<a href="mailto:mats@planetcatfish.com" target="_blank">mats@planetcatfish.com</a>></span><span> </span>wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><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><div><div class="gmail_extra"><br><div class="gmail_quote">On 30 January 2016 at 00:33, Matthias Braun via llvm-commits<span> </span><span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span><span> </span>wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style: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><font color="#888888"><div><br></div><div>- Matthias</div></font></span><div><div><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> </span><span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span><span> </span>wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Author: matze<br>Date: Fri Jan 29 16:35:29 2016<br>New Revision: 259255<br><br>URL:<span> </span><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>   <span> </span>llvm/trunk/lib/IR/AttributeImpl.h<br><br>Modified: llvm/trunk/lib/IR/AttributeImpl.h<br>URL:<span> </span><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>--<span> </span><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" 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><br></blockquote></div><br></div></div></div></blockquote></div><br><br clear="all"><div><br></div>--<span> </span><br><div>~Craig</div></div></div></div><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">_______________________________________________</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">LLVM Developers mailing list</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="mailto:llvm-dev@lists.llvm.org" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">llvm-dev@lists.llvm.org</a><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a></div></blockquote></div><br></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></div>