Replace OwningPtr<T> with std::unique_ptr<T>.
[oota-llvm.git] / unittests / ExecutionEngine / MCJIT / MCJITTestBase.h
index a8f6b2b1b828044498a72fb24eb612f1142fc354..b2cb3bbef6e6636e50e2c937fa60c9056adaad8b 100644 (file)
@@ -185,11 +185,9 @@ protected:
   // Populates Modules A and B:
   // Module A { Extern FB1, Function FA which calls FB1 },
   // Module B { Extern FA, Function FB1, Function FB2 which calls FA },
-  void createCrossModuleRecursiveCase(OwningPtr<Module> &A,
-                                      Function *&FA,
-                                      OwningPtr<Module> &B,
-                                      Function *&FB1,
-                                      Function *&FB2) {
+  void createCrossModuleRecursiveCase(std::unique_ptr<Module> &A, Function *&FA,
+                                      std::unique_ptr<Module> &B,
+                                      Function *&FB1, Function *&FB2) {
     // Define FB1 in B.
     B.reset(createEmptyModule("B"));
     FB1 = insertAccumulateFunction(B.get(), 0, "FB1");
@@ -211,12 +209,10 @@ protected:
   // Module A { Function FA },
   // Module B { Extern FA, Function FB which calls FA },
   // Module C { Extern FB, Function FC which calls FB },
-  void createThreeModuleChainedCallsCase(OwningPtr<Module> &A,
-                             Function *&FA,
-                             OwningPtr<Module> &B,
-                             Function *&FB,
-                             OwningPtr<Module> &C,
-                             Function *&FC) {
+  void
+  createThreeModuleChainedCallsCase(std::unique_ptr<Module> &A, Function *&FA,
+                                    std::unique_ptr<Module> &B, Function *&FB,
+                                    std::unique_ptr<Module> &C, Function *&FC) {
     A.reset(createEmptyModule("A"));
     FA = insertAddFunction(A.get());
 
@@ -233,8 +229,8 @@ protected:
   // Module A { Function FA },
   // Populates Modules A and B:
   // Module B { Function FB }
-  void createTwoModuleCase(OwningPtr<Module> &A, Function *&FA,
-                           OwningPtr<Module> &B, Function *&FB) {
+  void createTwoModuleCase(std::unique_ptr<Module> &A, Function *&FA,
+                           std::unique_ptr<Module> &B, Function *&FB) {
     A.reset(createEmptyModule("A"));
     FA = insertAddFunction(A.get());
 
@@ -244,8 +240,8 @@ protected:
 
   // Module A { Function FA },
   // Module B { Extern FA, Function FB which calls FA }
-  void createTwoModuleExternCase(OwningPtr<Module> &A, Function *&FA,
-                                 OwningPtr<Module> &B, Function *&FB) {
+  void createTwoModuleExternCase(std::unique_ptr<Module> &A, Function *&FA,
+                                 std::unique_ptr<Module> &B, Function *&FB) {
     A.reset(createEmptyModule("A"));
     FA = insertAddFunction(A.get());
 
@@ -258,12 +254,9 @@ protected:
   // Module A { Function FA },
   // Module B { Extern FA, Function FB which calls FA },
   // Module C { Extern FB, Function FC which calls FA },
-  void createThreeModuleCase(OwningPtr<Module> &A,
-                             Function *&FA,
-                             OwningPtr<Module> &B,
-                             Function *&FB,
-                             OwningPtr<Module> &C,
-                             Function *&FC) {
+  void createThreeModuleCase(std::unique_ptr<Module> &A, Function *&FA,
+                             std::unique_ptr<Module> &B, Function *&FB,
+                             std::unique_ptr<Module> &C, Function *&FC) {
     A.reset(createEmptyModule("A"));
     FA = insertAddFunction(A.get());
 
@@ -342,10 +335,10 @@ protected:
   CodeModel::Model CodeModel;
   StringRef MArch;
   SmallVector<std::string, 1> MAttrs;
-  OwningPtr<ExecutionEngine> TheJIT;
+  std::unique_ptr<ExecutionEngine> TheJIT;
   RTDyldMemoryManager *MM;
 
-  OwningPtr<Module> M;
+  std::unique_ptr<Module> M;
 };
 
 } // namespace llvm