[llvm] r206582 - [Allocator] Fix an obvious think-o with the move assignment

Chandler Carruth chandlerc at gmail.com
Fri Apr 18 04:02:30 PDT 2014


Author: chandlerc
Date: Fri Apr 18 06:02:29 2014
New Revision: 206582

URL: http://llvm.org/viewvc/llvm-project?rev=206582&view=rev
Log:
[Allocator] Fix an obvious think-o with the move assignment
implementation of the SpecificBumpPtrAllocator -- we have to actually
move the subobject. =] Noticed when using this code more directly.

Modified:
    llvm/trunk/include/llvm/Support/Allocator.h

Modified: llvm/trunk/include/llvm/Support/Allocator.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Allocator.h?rev=206582&r1=206581&r2=206582&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Allocator.h (original)
+++ llvm/trunk/include/llvm/Support/Allocator.h Fri Apr 18 06:02:29 2014
@@ -370,7 +370,7 @@ public:
   ~SpecificBumpPtrAllocator() { DestroyAll(); }
 
   SpecificBumpPtrAllocator &operator=(SpecificBumpPtrAllocator &&RHS) {
-    Allocator = RHS.Allocator;
+    Allocator = std::move(RHS.Allocator);
     return *this;
   }
 





More information about the llvm-commits mailing list