<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Yes, thanks. I just thought that avoiding auto here is more readable, but if I use auto, I'd do that way.</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Thu, Jan 29, 2015 at 6:02 PM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Thu, Jan 29, 2015 at 5:52 PM, Rui Ueyama <span dir="ltr"><<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: ruiu<br>
Date: Thu Jan 29 19:52:23 2015<br>
New Revision: 227543<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=227543&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=227543&view=rev</a><br>
Log:<br>
Explicitly write type instead of auto.<br>
<br>
Now it is clear that std::move() is meaningless here.<br>
<br>
Modified:<br>
    lld/trunk/include/lld/Core/Simple.h<br>
<br>
Modified: lld/trunk/include/lld/Core/Simple.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/Simple.h?rev=227543&r1=227542&r2=227543&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/Simple.h?rev=227543&r1=227542&r2=227543&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/include/lld/Core/Simple.h (original)<br>
+++ lld/trunk/include/lld/Core/Simple.h Thu Jan 29 19:52:23 2015<br>
@@ -80,14 +80,14 @@ protected:<br>
 class SimpleFileWrapper : public SimpleFile {<br>
 public:<br>
   SimpleFileWrapper(const File &file) : SimpleFile(file.path()) {<br>
-    for (auto definedAtom : file.defined())<br>
-      _definedAtoms._atoms.push_back(std::move(definedAtom));<br>
-    for (auto undefAtom : file.undefined())<br>
-      _undefinedAtoms._atoms.push_back(std::move(undefAtom));<br>
-    for (auto shlibAtom : file.sharedLibrary())<br>
-      _sharedLibraryAtoms._atoms.push_back(std::move(shlibAtom));<br>
-    for (auto absAtom : file.absolute())<br>
-      _absoluteAtoms._atoms.push_back(std::move(absAtom));<br>
+    for (const DefinedAtom *atom : file.defined())<br></blockquote></div></div><div><br>If you'd like to use auto for these, you can still demonstrate that it's a pointer (to const) & that's preferred by the LLVM style guide:<br><br>  for (const auto *atom : file.defined())<br><br>etc.<br> </div><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+      _definedAtoms._atoms.push_back(atom);<br>
+    for (const UndefinedAtom *atom : file.undefined())<br>
+      _undefinedAtoms._atoms.push_back(atom);<br>
+    for (const SharedLibraryAtom *atom : file.sharedLibrary())<br>
+      _sharedLibraryAtoms._atoms.push_back(atom);<br>
+    for (const AbsoluteAtom *atom : file.absolute())<br>
+      _absoluteAtoms._atoms.push_back(atom);<br>
   }<br>
 };<br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">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></span></div><br></div></div>
</blockquote></div><br></div></div>