[lld] r227543 - Explicitly write type instead of auto.

Rui Ueyama ruiu at google.com
Thu Jan 29 17:52:23 PST 2015


Author: ruiu
Date: Thu Jan 29 19:52:23 2015
New Revision: 227543

URL: http://llvm.org/viewvc/llvm-project?rev=227543&view=rev
Log:
Explicitly write type instead of auto.

Now it is clear that std::move() is meaningless here.

Modified:
    lld/trunk/include/lld/Core/Simple.h

Modified: lld/trunk/include/lld/Core/Simple.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/Simple.h?rev=227543&r1=227542&r2=227543&view=diff
==============================================================================
--- lld/trunk/include/lld/Core/Simple.h (original)
+++ lld/trunk/include/lld/Core/Simple.h Thu Jan 29 19:52:23 2015
@@ -80,14 +80,14 @@ protected:
 class SimpleFileWrapper : public SimpleFile {
 public:
   SimpleFileWrapper(const File &file) : SimpleFile(file.path()) {
-    for (auto definedAtom : file.defined())
-      _definedAtoms._atoms.push_back(std::move(definedAtom));
-    for (auto undefAtom : file.undefined())
-      _undefinedAtoms._atoms.push_back(std::move(undefAtom));
-    for (auto shlibAtom : file.sharedLibrary())
-      _sharedLibraryAtoms._atoms.push_back(std::move(shlibAtom));
-    for (auto absAtom : file.absolute())
-      _absoluteAtoms._atoms.push_back(std::move(absAtom));
+    for (const DefinedAtom *atom : file.defined())
+      _definedAtoms._atoms.push_back(atom);
+    for (const UndefinedAtom *atom : file.undefined())
+      _undefinedAtoms._atoms.push_back(atom);
+    for (const SharedLibraryAtom *atom : file.sharedLibrary())
+      _sharedLibraryAtoms._atoms.push_back(atom);
+    for (const AbsoluteAtom *atom : file.absolute())
+      _absoluteAtoms._atoms.push_back(atom);
   }
 };
 





More information about the llvm-commits mailing list