If you don't need null values, you could have <null, ""> be the empty key and <"", null> be the tombstone, or something like that.<br><br><div>On Fri Dec 20 2013 at 11:50:20 AM, Timur Iskhodzhanov <<a href="mailto:timurrrr@google.com">timurrrr@google.com</a>> wrote:</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
================<br>
Comment at: include/llvm/ADT/DenseMapInfo.<u></u>h:136<br>
@@ +135,3 @@<br>
+  static inline StringRef getEmptyKey() { return StringRef("emptykey"); }<br>
+  static inline StringRef getTombstoneKey() { return StringRef("tombstone!"); }<br>
+  static unsigned getHashValue(const StringRef &Val) {<br>
----------------<br>
Rafael Ávila de Espíndola wrote:<br>
> This is way too specific to be in this header. "emptykey" and "tombstone!" are valid keys.<br>
Agreed, but not sure how to proceed.<br>
<br>
Can you recommend a better way to create a `DenseMap<pair<StringRef, StringRef>, X>` ?<br>
<br>
<br>
<a href="http://llvm-reviews.chandlerc.com/D2232" target="_blank">http://llvm-reviews.chandlerc.<u></u>com/D2232</a><br>
</blockquote>