<div class="gmail_quote">On Wed, Mar 7, 2012 at 11:42 PM, Daniel Dunbar <span dir="ltr"><<a href="mailto:daniel@zuster.org">daniel@zuster.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":t2">+inline void FoldingSetNodeID::AddPointer(const void *Ptr) {<br>
+  // Note: this adds pointers to the hash using sizes and endianness that<br>
+  // depend on the host.  It doesn't matter however, because hashing on<br>
+  // pointer values in inherently unstable.  Nothing  should depend on the<br>
+  // ordering of nodes in the folding set.<br>
+  if (sizeof(void*) == sizeof(unsigned))<br>
+    AddInteger((unsigned) (unsigned long long) Ptr);<br>
+  else if (sizeof(void*) == sizeof(unsigned long long)) {<br>
+    AddInteger((unsigned long long) Ptr);<br></div></blockquote><div><br></div><div>Why not cast to uintptr_t, and ensure there is an AddInteger for that size?</div><div><br></div><div>Also, it looks like this patch is still causing significant regressions on the build bots: <a href="http://lab.llvm.org:8011/builders/llvm-x86_64-linux/builds/3517">http://lab.llvm.org:8011/builders/llvm-x86_64-linux/builds/3517</a></div>
</div>