[PATCH] D10725: Improve testing for the C API

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 19 17:08:34 PST 2016


joker.eph added a subscriber: joker.eph.

================
Comment at: tools/llvm-c-test/echo.cpp:32
@@ +31,3 @@
+template<typename T>
+struct CAPIDenseMap<T*> {
+  struct CAPIDenseMapInfo {
----------------
Comment.

================
Comment at: tools/llvm-c-test/echo.cpp:44
@@ +43,3 @@
+      return (unsigned((uintptr_t)PtrVal) >> 4) ^
+             (unsigned((uintptr_t)PtrVal) >> 9);
+    }
----------------
Why not just reuse hash_value?
```
return hash_value(PtrVal);
```


http://reviews.llvm.org/D10725





More information about the llvm-commits mailing list