Since we use C++11, we should switch over to using std::unique_ptr when C++11 is being used. To do this, we follow what we have done for shared pointers and we define a STD_UNIQUE_PTR macro that can be used and it will "do the right thing". Due to some API differences in std::unique_ptr and due to the fact that we need to be able to compile without C++11, we can't use move semantics so some code needed to change so that it can compile with either C++.
Anyone wanting to use a unique_ptr or auto_ptr should now use the "STD_UNIQUE_PTR(TYPE)" macro.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179779 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/Target.cpp b/source/Target/Target.cpp
index ea97fd7..8d3e19e 100644
--- a/source/Target/Target.cpp
+++ b/source/Target/Target.cpp
@@ -76,9 +76,9 @@
m_valid (true),
m_search_filter_sp (),
m_image_search_paths (ImageSearchPathsChanged, this),
- m_scratch_ast_context_ap (NULL),
- m_scratch_ast_source_ap (NULL),
- m_ast_importer_ap (NULL),
+ m_scratch_ast_context_ap (),
+ m_scratch_ast_source_ap (),
+ m_ast_importer_ap (),
m_persistent_variables (),
m_source_manager_ap(),
m_stop_hooks (),
@@ -2143,7 +2143,7 @@
m_target_sp (target_sp),
m_commands (),
m_specifier_sp (),
- m_thread_spec_ap(NULL),
+ m_thread_spec_ap(),
m_active (true)
{
}
@@ -2153,7 +2153,7 @@
m_target_sp (rhs.m_target_sp),
m_commands (rhs.m_commands),
m_specifier_sp (rhs.m_specifier_sp),
- m_thread_spec_ap (NULL),
+ m_thread_spec_ap (),
m_active (rhs.m_active)
{
if (rhs.m_thread_spec_ap.get() != NULL)