[llvm] r203447 - [LCG] Make the iterator move constructable (and thus movable in general)

Chandler Carruth chandlerc at gmail.com
Mon Mar 10 01:08:49 PDT 2014


Author: chandlerc
Date: Mon Mar 10 03:08:47 2014
New Revision: 203447

URL: http://llvm.org/viewvc/llvm-project?rev=203447&view=rev
Log:
[LCG] Make the iterator move constructable (and thus movable in general)
now that there is essentially no cost to doing so. Yay C++11.

Modified:
    llvm/trunk/include/llvm/Analysis/LazyCallGraph.h

Modified: llvm/trunk/include/llvm/Analysis/LazyCallGraph.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/LazyCallGraph.h?rev=203447&r1=203446&r2=203447&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/LazyCallGraph.h (original)
+++ llvm/trunk/include/llvm/Analysis/LazyCallGraph.h Mon Mar 10 03:08:47 2014
@@ -132,7 +132,7 @@ public:
 
   public:
     iterator(const iterator &Arg) : G(Arg.G), NI(Arg.NI) {}
-
+    iterator(iterator &&Arg) : G(Arg.G), NI(std::move(Arg.NI)) {}
     iterator &operator=(iterator Arg) {
       std::swap(Arg, *this);
       return *this;





More information about the llvm-commits mailing list