aboutsummaryrefslogtreecommitdiff
path: root/source/API/SBInstruction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/API/SBInstruction.cpp')
-rw-r--r--source/API/SBInstruction.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/API/SBInstruction.cpp b/source/API/SBInstruction.cpp
index 5b3c0aac2..abc390b24 100644
--- a/source/API/SBInstruction.cpp
+++ b/source/API/SBInstruction.cpp
@@ -10,6 +10,7 @@
#include "lldb/API/SBAddress.h"
#include "lldb/API/SBFrame.h"
+
#include "lldb/API/SBInstruction.h"
#include "lldb/API/SBStream.h"
#include "lldb/API/SBTarget.h"
@@ -25,6 +26,8 @@
#include "lldb/Utility/DataBufferHeap.h"
#include "lldb/Utility/DataExtractor.h"
+#include <memory>
+
//----------------------------------------------------------------------
// We recently fixed a leak in one of the Instruction subclasses where the
// instruction will only hold a weak reference to the disassembler to avoid a
@@ -190,7 +193,7 @@ lldb::InstructionSP SBInstruction::GetOpaque() {
void SBInstruction::SetOpaque(const lldb::DisassemblerSP &disasm_sp,
const lldb::InstructionSP &inst_sp) {
- m_opaque_sp.reset(new InstructionImpl(disasm_sp, inst_sp));
+ m_opaque_sp = std::make_shared<InstructionImpl>(disasm_sp, inst_sp);
}
bool SBInstruction::GetDescription(lldb::SBStream &s) {