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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235479 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie 2015-04-22 04:39:13 +00:00
parent 337b35ae29
commit bc9eee72cf

View File

@ -21,7 +21,7 @@ namespace {
class ValueHandle : public testing::Test { class ValueHandle : public testing::Test {
protected: protected:
Constant *ConstantV; Constant *ConstantV;
std::auto_ptr<BitCastInst> BitcastV; std::unique_ptr<BitCastInst> BitcastV;
ValueHandle() : ValueHandle() :
ConstantV(ConstantInt::get(Type::getInt32Ty(getGlobalContext()), 0)), ConstantV(ConstantInt::get(Type::getInt32Ty(getGlobalContext()), 0)),
@ -320,7 +320,7 @@ TEST_F(ValueHandle, CallbackVH_DeletionCanRAUW) {
// a CallbackVH to remove the uses before the check for no uses. // a CallbackVH to remove the uses before the check for no uses.
RecoveringVH RVH; RecoveringVH RVH;
RVH = BitcastV.get(); RVH = BitcastV.get();
std::auto_ptr<BinaryOperator> BitcastUser( std::unique_ptr<BinaryOperator> BitcastUser(
BinaryOperator::CreateAdd(RVH, BinaryOperator::CreateAdd(RVH,
Constant::getNullValue(Type::getInt32Ty(getGlobalContext())))); Constant::getNullValue(Type::getInt32Ty(getGlobalContext()))));
EXPECT_EQ(BitcastV.get(), BitcastUser->getOperand(0)); EXPECT_EQ(BitcastV.get(), BitcastUser->getOperand(0));