[llvm] r220655 - [PBQP] Tidying up as per Dave Blaikie's suggesions for r220642.

Lang Hames lhames at gmail.com
Sun Oct 26 15:12:03 PDT 2014


Author: lhames
Date: Sun Oct 26 17:12:02 2014
New Revision: 220655

URL: http://llvm.org/viewvc/llvm-project?rev=220655&view=rev
Log:
[PBQP] Tidying up as per Dave Blaikie's suggesions for r220642.

Modified:
    llvm/trunk/include/llvm/CodeGen/RegAllocPBQP.h

Modified: llvm/trunk/include/llvm/CodeGen/RegAllocPBQP.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/RegAllocPBQP.h?rev=220655&r1=220654&r2=220655&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/RegAllocPBQP.h (original)
+++ llvm/trunk/include/llvm/CodeGen/RegAllocPBQP.h Sun Oct 26 17:12:02 2014
@@ -109,9 +109,9 @@ public:
     RS = Other.RS;
     NumOpts = Other.NumOpts;
     DeniedOpts = Other.DeniedOpts;
-    OptUnsafeEdges = std::unique_ptr<unsigned[]>(new unsigned[NumOpts]);
-    std::copy(&Other.OptUnsafeEdges[0], &Other.OptUnsafeEdges[NumOpts],
-              &OptUnsafeEdges[0]);
+    OptUnsafeEdges.reset(new unsigned[NumOpts]);
+    std::copy(Other.OptUnsafeEdges.get(), Other.OptUnsafeEdges.get() + NumOpts,
+              OptUnsafeEdges.get());
     VReg = Other.VReg;
     OptionRegs = Other.OptionRegs;
     return *this;





More information about the llvm-commits mailing list