From 7375f4f98148fc34f0c7fc765967501cdc65b24e Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Tue, 26 Feb 2013 21:20:35 +0000 Subject: Fix auto_ptr is deprecated warnings git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176123 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-stress/llvm-stress.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'tools/llvm-stress') diff --git a/tools/llvm-stress/llvm-stress.cpp b/tools/llvm-stress/llvm-stress.cpp index 3848daaed5..fbda1b7b67 100644 --- a/tools/llvm-stress/llvm-stress.cpp +++ b/tools/llvm-stress/llvm-stress.cpp @@ -12,6 +12,7 @@ // //===----------------------------------------------------------------------===// #include "llvm/IR/LLVMContext.h" +#include "llvm/ADT/OwningPtr.h" #include "llvm/Analysis/CallGraphSCCPass.h" #include "llvm/Analysis/Verifier.h" #include "llvm/Assembly/PrintModulePass.h" @@ -26,7 +27,6 @@ #include "llvm/Support/PrettyStackTrace.h" #include "llvm/Support/ToolOutputFile.h" #include -#include #include #include #include @@ -622,15 +622,15 @@ void FillFunction(Function *F, Random &R) { // List of modifiers which add new random instructions. std::vector Modifiers; - std::auto_ptr LM(new LoadModifier(BB, &PT, &R)); - std::auto_ptr SM(new StoreModifier(BB, &PT, &R)); - std::auto_ptr EE(new ExtractElementModifier(BB, &PT, &R)); - std::auto_ptr SHM(new ShuffModifier(BB, &PT, &R)); - std::auto_ptr IE(new InsertElementModifier(BB, &PT, &R)); - std::auto_ptr BM(new BinModifier(BB, &PT, &R)); - std::auto_ptr CM(new CastModifier(BB, &PT, &R)); - std::auto_ptr SLM(new SelectModifier(BB, &PT, &R)); - std::auto_ptr PM(new CmpModifier(BB, &PT, &R)); + OwningPtr LM(new LoadModifier(BB, &PT, &R)); + OwningPtr SM(new StoreModifier(BB, &PT, &R)); + OwningPtr EE(new ExtractElementModifier(BB, &PT, &R)); + OwningPtr SHM(new ShuffModifier(BB, &PT, &R)); + OwningPtr IE(new InsertElementModifier(BB, &PT, &R)); + OwningPtr BM(new BinModifier(BB, &PT, &R)); + OwningPtr CM(new CastModifier(BB, &PT, &R)); + OwningPtr SLM(new SelectModifier(BB, &PT, &R)); + OwningPtr PM(new CmpModifier(BB, &PT, &R)); Modifiers.push_back(LM.get()); Modifiers.push_back(SM.get()); Modifiers.push_back(EE.get()); @@ -684,7 +684,7 @@ int main(int argc, char **argv) { cl::ParseCommandLineOptions(argc, argv, "llvm codegen stress-tester\n"); llvm_shutdown_obj Y; - std::auto_ptr M(new Module("/tmp/autogen.bc", getGlobalContext())); + OwningPtr M(new Module("/tmp/autogen.bc", getGlobalContext())); Function *F = GenEmptyFunction(M.get()); // Pick an initial seed value -- cgit v1.2.3