]> git.saurik.com Git - apple/ld64.git/blobdiff - src/ld/ld.hpp
ld64-136.tar.gz
[apple/ld64.git] / src / ld / ld.hpp
index ed021ffa6da35322d1fb6f61f893be8800891052..7be00a3a624af6cc79a5cda5f865a42ac8e30f86 100644 (file)
@@ -788,6 +788,20 @@ public:
 
 
 
+       
+// utility classes for using std::unordered_map with c-strings
+struct CStringHash {
+       size_t operator()(const char* __s) const {
+               size_t __h = 0;
+               for ( ; *__s; ++__s)
+                       __h = 5 * __h + *__s;
+               return __h;
+       };
+};
+struct CStringEquals
+{
+       bool operator()(const char* left, const char* right) const { return (strcmp(left, right) == 0); }
+};