<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 23, 2015 at 5:50 AM, 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: Mon Feb 23 07:50:23 2015<br>
New Revision: 230219<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=230219&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=230219&view=rev</a><br>
Log:<br>
[ELF][Writer] Use llvm::StringMap instead<br></blockquote><div><br>This does change the semantics somewhat - StringMaps own their strings. do you need that? (if so, is there a test case for where the map<StringRef was insufficient?) Or does this use case neither require nor forbid copying the strings, and just benefit from the StringMap optimizations in memory, etc?<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Cleanup.<br>
<br>
Modified:<br>
    lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h?rev=230219&r1=230218&r2=230219&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h?rev=230219&r1=230218&r2=230219&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h (original)<br>
+++ lld/trunk/lib/ReaderWriter/ELF/DefaultLayout.h Mon Feb 23 07:50:23 2015<br>
@@ -148,7 +148,7 @@ public:<br>
<br>
   // Output Sections contain the map of Sectionnames to a vector of sections,<br>
   // that have been merged to form a single section<br>
-  typedef std::map<StringRef, OutputSection<ELFT> *> OutputSectionMapT;<br>
+  typedef llvm::StringMap<OutputSection<ELFT> *> OutputSectionMapT;<br>
   typedef<br>
       typename std::vector<OutputSection<ELFT> *>::iterator OutputSectionIter;<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>