[llvm] r235479 - Replace std::auto_ptr with std::unique_ptr

David Blaikie dblaikie at gmail.com
Tue Apr 21 21:39:13 PDT 2015


Author: dblaikie
Date: Tue Apr 21 23:39:13 2015
New Revision: 235479

URL: http://llvm.org/viewvc/llvm-project?rev=235479&view=rev
Log:
Replace std::auto_ptr with std::unique_ptr

std::auto_ptr is deprecated in GCC 5.0, and we are already using
std::unique_ptr all over the place.

Patch by Xan López.

Modified:
    llvm/trunk/unittests/IR/ValueHandleTest.cpp

Modified: llvm/trunk/unittests/IR/ValueHandleTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/IR/ValueHandleTest.cpp?rev=235479&r1=235478&r2=235479&view=diff
==============================================================================
--- llvm/trunk/unittests/IR/ValueHandleTest.cpp (original)
+++ llvm/trunk/unittests/IR/ValueHandleTest.cpp Tue Apr 21 23:39:13 2015
@@ -21,7 +21,7 @@ namespace {
 class ValueHandle : public testing::Test {
 protected:
   Constant *ConstantV;
-  std::auto_ptr<BitCastInst> BitcastV;
+  std::unique_ptr<BitCastInst> BitcastV;
 
   ValueHandle() :
     ConstantV(ConstantInt::get(Type::getInt32Ty(getGlobalContext()), 0)),
@@ -320,7 +320,7 @@ TEST_F(ValueHandle, CallbackVH_DeletionC
   // a CallbackVH to remove the uses before the check for no uses.
   RecoveringVH RVH;
   RVH = BitcastV.get();
-  std::auto_ptr<BinaryOperator> BitcastUser(
+  std::unique_ptr<BinaryOperator> BitcastUser(
     BinaryOperator::CreateAdd(RVH, 
                               Constant::getNullValue(Type::getInt32Ty(getGlobalContext()))));
   EXPECT_EQ(BitcastV.get(), BitcastUser->getOperand(0));






More information about the llvm-commits mailing list