unique_ptrify LoadedObjectInfo::clone
[oota-llvm.git] / include / llvm / DebugInfo / DIContext.h
index d8830da56b518cdf352cdf036fae088b9a264792..da1b5e985d85cdf5cc8314ec2052557fb6ea3bc6 100644 (file)
@@ -22,6 +22,7 @@
 #include "llvm/Support/Casting.h"
 #include "llvm/Support/DataTypes.h"
 #include <string>
+#include <memory>
 
 namespace llvm {
 
@@ -165,11 +166,7 @@ public:
   virtual bool getLoadedSectionContents(StringRef Name, StringRef &Data) const {
     return false;
   }
-
-  /// Obtain a copy of this LoadedObjectInfo.
-  ///
-  /// The caller is responsible for deallocation once the copy is no longer required.
-  virtual LoadedObjectInfo *clone() const = 0;
+  virtual std::unique_ptr<LoadedObjectInfo> clone() const = 0;
 };
 
 }