diff options
| -rw-r--r-- | llvm/include/llvm/DebugInfo/DIContext.h | 7 | ||||
| -rw-r--r-- | llvm/include/llvm/ExecutionEngine/RuntimeDyld.h | 5 |
2 files changed, 7 insertions, 5 deletions
diff --git a/llvm/include/llvm/DebugInfo/DIContext.h b/llvm/include/llvm/DebugInfo/DIContext.h index da1b5e985d8..d8830da56b5 100644 --- a/llvm/include/llvm/DebugInfo/DIContext.h +++ b/llvm/include/llvm/DebugInfo/DIContext.h @@ -22,7 +22,6 @@ #include "llvm/Support/Casting.h" #include "llvm/Support/DataTypes.h" #include <string> -#include <memory> namespace llvm { @@ -166,7 +165,11 @@ public: virtual bool getLoadedSectionContents(StringRef Name, StringRef &Data) const { return false; } - virtual std::unique_ptr<LoadedObjectInfo> clone() const = 0; + + /// Obtain a copy of this LoadedObjectInfo. + /// + /// The caller is responsible for deallocation once the copy is no longer required. + virtual LoadedObjectInfo *clone() const = 0; }; } diff --git a/llvm/include/llvm/ExecutionEngine/RuntimeDyld.h b/llvm/include/llvm/ExecutionEngine/RuntimeDyld.h index b882f133adb..ac0151aa7ec 100644 --- a/llvm/include/llvm/ExecutionEngine/RuntimeDyld.h +++ b/llvm/include/llvm/ExecutionEngine/RuntimeDyld.h @@ -16,7 +16,6 @@ #include "JITSymbolFlags.h" #include "llvm/ADT/StringRef.h" -#include "llvm/ADT/STLExtras.h" #include "llvm/Support/Memory.h" #include "llvm/DebugInfo/DIContext.h" #include <memory> @@ -81,8 +80,8 @@ public: LoadedObjectInfoHelper(RuntimeDyldImpl &RTDyld, unsigned BeginIdx, unsigned EndIdx) : LoadedObjectInfo(RTDyld, BeginIdx, EndIdx) {} - std::unique_ptr<llvm::LoadedObjectInfo> clone() const override { - return llvm::make_unique<Derived>(static_cast<const Derived &>(*this)); + llvm::LoadedObjectInfo *clone() const override { + return new Derived(static_cast<const Derived &>(*this)); } }; |

