<div dir="ltr">Might be worth just switching the loops to 'auto'? But I don't mind either way, just a thought.<div><br></div><div>Oh, and I assume StringRef is implicitly convertible from SmallString, so you might be able to simplify "StringRef(Obj.data(), Obj.size())" down to "Obj"?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Apr 9, 2016 at 4:00 PM, Davide Italiano via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: davide<br>
Date: Sat Apr  9 18:00:31 2016<br>
New Revision: 265885<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=265885&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=265885&view=rev</a><br>
Log:<br>
[COFF] SmallVector<char, 0> -> SmallString<0>.<br>
<br>
This way we're consistent between ELF and COFF.<br>
<br>
Modified:<br>
    lld/trunk/COFF/SymbolTable.cpp<br>
    lld/trunk/COFF/SymbolTable.h<br>
<br>
Modified: lld/trunk/COFF/SymbolTable.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/SymbolTable.cpp?rev=265885&r1=265884&r2=265885&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/SymbolTable.cpp?rev=265885&r1=265884&r2=265885&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/COFF/SymbolTable.cpp (original)<br>
+++ lld/trunk/COFF/SymbolTable.cpp Sat Apr  9 18:00:31 2016<br>
@@ -420,7 +420,7 @@ std::vector<ObjectFile *> SymbolTable::c<br>
   // Use std::list to avoid invalidation of pointers in OSPtrs.<br>
   std::list<raw_svector_ostream> OSs;<br>
   std::vector<raw_pwrite_stream *> OSPtrs;<br>
-  for (SmallVector<char, 0> &Obj : Objs) {<br>
+  for (SmallString<0> &Obj : Objs) {<br>
     OSs.emplace_back(Obj);<br>
     OSPtrs.push_back(&OSs.back());<br>
   }<br>
@@ -429,7 +429,7 @@ std::vector<ObjectFile *> SymbolTable::c<br>
     error(""); // compileOptimized() should have emitted any error message.<br>
<br>
   std::vector<ObjectFile *> ObjFiles;<br>
-  for (SmallVector<char, 0> &Obj : Objs) {<br>
+  for (SmallString<0> &Obj : Objs) {<br>
     auto *ObjFile = new ObjectFile(<br>
         MemoryBufferRef(StringRef(Obj.data(), Obj.size()), "<LTO object>"));<br>
     Files.emplace_back(ObjFile);<br>
<br>
Modified: lld/trunk/COFF/SymbolTable.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/SymbolTable.h?rev=265885&r1=265884&r2=265885&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/SymbolTable.h?rev=265885&r1=265884&r2=265885&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/COFF/SymbolTable.h (original)<br>
+++ lld/trunk/COFF/SymbolTable.h Sat Apr  9 18:00:31 2016<br>
@@ -115,7 +115,7 @@ private:<br>
   std::vector<std::future<InputFile *>> ObjectQueue;<br>
<br>
   std::vector<BitcodeFile *> BitcodeFiles;<br>
-  std::vector<SmallVector<char, 0>> Objs;<br>
+  std::vector<SmallString<0>> Objs;<br>
   llvm::BumpPtrAllocator Alloc;<br>
 };<br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>