<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 13, 2015 at 10:26 PM, Shankar Easwaran <span dir="ltr"><<a href="mailto:shankare@codeaurora.org" target="_blank">shankare@codeaurora.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: shankare<br>
Date: Sat Mar 14 00:26:55 2015<br>
New Revision: 232251<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=232251&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=232251&view=rev</a><br>
Log:<br>
[ELF] Fix DenseMapInfo for StringRef<br>
<br>
Modified:<br>
    lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h?rev=232251&r1=232250&r2=232251&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h?rev=232251&r1=232250&r2=232251&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h (original)<br>
+++ lld/trunk/lib/ReaderWriter/ELF/SectionChunks.h Sat Mar 14 00:26:55 2015<br>
@@ -574,7 +574,7 @@ private:<br>
<br>
   struct StringRefMappingInfo {<br>
     static StringRef getEmptyKey() { return StringRef(); }<br>
-    static StringRef getTombstoneKey() { return StringRef(" ", 0); }<br>
+    static StringRef getTombstoneKey() { return StringRef(" ", 1); }<br></blockquote><div><br></div><div>These look really questionable/problematic - they're totally valid StringRef values  - I imagine maybe using the max value for a pointer (or for the length, or both) might be more suitable, but I haven't looked at a variety of DenseMap tombstones, etc, to see what's common.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
     static unsigned getHashValue(StringRef const val) {<br>
       return llvm::HashString(val);<br>
     }<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div></div>