summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-09-04 18:37:29 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-09-04 18:37:29 +0000
commit847d2a061b7f48b867a2aa1ccd245f54fa1382eb (patch)
treeca989cea43d248c5c55a173f1017aff3c5f7475e /llvm/lib/ExecutionEngine
parent4db69bd5422e3a51e1843652682f7f753baf3c7d (diff)
downloadbcm5719-llvm-847d2a061b7f48b867a2aa1ccd245f54fa1382eb.tar.gz
bcm5719-llvm-847d2a061b7f48b867a2aa1ccd245f54fa1382eb.zip
unique_ptrify RuntimeDyld::Dyld
llvm-svn: 217180
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
index 24c346f8e67..5a178763b50 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
@@ -778,7 +778,7 @@ RuntimeDyld::RuntimeDyld(RTDyldMemoryManager *mm) {
Checker = nullptr;
}
-RuntimeDyld::~RuntimeDyld() { delete Dyld; }
+RuntimeDyld::~RuntimeDyld() {}
static std::unique_ptr<RuntimeDyldELF>
createRuntimeDyldELF(RTDyldMemoryManager *MM, bool ProcessAllSections,
@@ -807,13 +807,13 @@ RuntimeDyld::loadObject(std::unique_ptr<ObjectFile> InputObject) {
if (InputObject->isELF()) {
InputImage.reset(RuntimeDyldELF::createObjectImageFromFile(std::move(InputObject)));
if (!Dyld)
- Dyld = createRuntimeDyldELF(MM, ProcessAllSections, Checker).release();
+ Dyld = createRuntimeDyldELF(MM, ProcessAllSections, Checker);
} else if (InputObject->isMachO()) {
InputImage.reset(RuntimeDyldMachO::createObjectImageFromFile(std::move(InputObject)));
if (!Dyld)
Dyld = createRuntimeDyldMachO(
- static_cast<Triple::ArchType>(InputImage->getArch()),
- MM, ProcessAllSections, Checker).release();
+ static_cast<Triple::ArchType>(InputImage->getArch()), MM,
+ ProcessAllSections, Checker);
} else
report_fatal_error("Incompatible object format!");
@@ -836,7 +836,7 @@ RuntimeDyld::loadObject(std::unique_ptr<ObjectBuffer> InputBuffer) {
case sys::fs::file_magic::elf_core:
InputImage = RuntimeDyldELF::createObjectImage(std::move(InputBuffer));
if (!Dyld)
- Dyld = createRuntimeDyldELF(MM, ProcessAllSections, Checker).release();
+ Dyld = createRuntimeDyldELF(MM, ProcessAllSections, Checker);
break;
case sys::fs::file_magic::macho_object:
case sys::fs::file_magic::macho_executable:
@@ -851,8 +851,8 @@ RuntimeDyld::loadObject(std::unique_ptr<ObjectBuffer> InputBuffer) {
InputImage = RuntimeDyldMachO::createObjectImage(std::move(InputBuffer));
if (!Dyld)
Dyld = createRuntimeDyldMachO(
- static_cast<Triple::ArchType>(InputImage->getArch()),
- MM, ProcessAllSections, Checker).release();
+ static_cast<Triple::ArchType>(InputImage->getArch()), MM,
+ ProcessAllSections, Checker);
break;
case sys::fs::file_magic::unknown:
case sys::fs::file_magic::bitcode:
OpenPOWER on IntegriCloud