summaryrefslogtreecommitdiffstats
path: root/lldb/source
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/Breakpoint/BreakpointOptions.cpp6
-rw-r--r--lldb/source/Breakpoint/WatchpointOptions.cpp4
-rw-r--r--lldb/source/Commands/CommandObjectBreakpointCommand.cpp4
-rw-r--r--lldb/source/Commands/CommandObjectCommands.cpp2
-rw-r--r--lldb/source/Commands/CommandObjectTarget.cpp2
-rw-r--r--lldb/source/Commands/CommandObjectWatchpointCommand.cpp4
-rw-r--r--lldb/source/Core/Communication.cpp2
-rw-r--r--lldb/source/Core/Disassembler.cpp6
-rw-r--r--lldb/source/Core/DynamicLoader.cpp4
-rw-r--r--lldb/source/Core/Module.cpp11
-rw-r--r--lldb/source/Core/StreamAsynchronousIO.cpp2
-rw-r--r--lldb/source/Expression/ClangExpressionDeclMap.cpp12
-rw-r--r--lldb/source/Expression/ClangExpressionParser.cpp24
-rw-r--r--lldb/source/Expression/ClangFunction.cpp1
-rw-r--r--lldb/source/Expression/ClangUserExpression.cpp2
-rw-r--r--lldb/source/Expression/ClangUtilityFunction.cpp1
-rw-r--r--lldb/source/Expression/DWARFExpression.cpp4
-rw-r--r--lldb/source/Expression/IRExecutionUnit.cpp8
-rw-r--r--lldb/source/Expression/IRInterpreter.cpp2
-rw-r--r--lldb/source/Host/common/File.cpp2
-rw-r--r--lldb/source/Host/common/FileSpec.cpp5
-rw-r--r--lldb/source/Host/common/Host.cpp4
-rw-r--r--lldb/source/Host/freebsd/Host.cpp2
-rw-r--r--lldb/source/Host/linux/Host.cpp2
-rw-r--r--lldb/source/Interpreter/CommandInterpreter.cpp24
-rw-r--r--lldb/source/Interpreter/Options.cpp2
-rw-r--r--lldb/source/Interpreter/ScriptInterpreter.cpp4
-rw-r--r--lldb/source/Interpreter/ScriptInterpreterPython.cpp12
-rw-r--r--lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp6
-rw-r--r--lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h22
-rw-r--r--lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp2
-rw-r--r--lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h2
-rw-r--r--lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp4
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h10
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp2
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h2
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp50
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h12
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h6
-rw-r--r--lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp14
-rw-r--r--lldb/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp2
-rw-r--r--lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp2
-rw-r--r--lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h2
-rw-r--r--lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp4
-rw-r--r--lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp2
-rw-r--r--lldb/source/Plugins/OperatingSystem/Darwin-Kernel/OperatingSystemDarwinKernel.h2
-rw-r--r--lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp2
-rw-r--r--lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h2
-rw-r--r--lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp4
-rw-r--r--lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp4
-rw-r--r--lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp2
-rw-r--r--lldb/source/Plugins/Process/POSIX/POSIXThread.h2
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp2
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h2
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h2
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp12
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h19
-rw-r--r--lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp2
-rw-r--r--lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h2
-rw-r--r--lldb/source/Symbol/FuncUnwinders.cpp16
-rw-r--r--lldb/source/Symbol/LineTable.cpp2
-rw-r--r--lldb/source/Symbol/ObjectFile.cpp8
-rw-r--r--lldb/source/Symbol/SymbolFile.cpp6
-rw-r--r--lldb/source/Symbol/SymbolVendor.cpp2
-rw-r--r--lldb/source/Target/LanguageRuntime.cpp2
-rw-r--r--lldb/source/Target/Memory.cpp2
-rw-r--r--lldb/source/Target/OperatingSystem.cpp4
-rw-r--r--lldb/source/Target/Platform.cpp4
-rw-r--r--lldb/source/Target/Process.cpp2
-rw-r--r--lldb/source/Target/StackFrameList.cpp2
-rw-r--r--lldb/source/Target/Target.cpp10
-rw-r--r--lldb/source/Target/UnwindAssembly.cpp2
72 files changed, 219 insertions, 204 deletions
diff --git a/lldb/source/Breakpoint/BreakpointOptions.cpp b/lldb/source/Breakpoint/BreakpointOptions.cpp
index 60679c94a76..11335fb1db9 100644
--- a/lldb/source/Breakpoint/BreakpointOptions.cpp
+++ b/lldb/source/Breakpoint/BreakpointOptions.cpp
@@ -41,7 +41,7 @@ BreakpointOptions::BreakpointOptions() :
m_enabled (true),
m_one_shot (false),
m_ignore_count (0),
- m_thread_spec_ap (NULL),
+ m_thread_spec_ap (),
m_condition_ap()
{
}
@@ -56,8 +56,8 @@ BreakpointOptions::BreakpointOptions(const BreakpointOptions& rhs) :
m_enabled (rhs.m_enabled),
m_one_shot (rhs.m_one_shot),
m_ignore_count (rhs.m_ignore_count),
- m_thread_spec_ap (NULL),
- m_condition_ap (NULL)
+ m_thread_spec_ap (),
+ m_condition_ap ()
{
if (rhs.m_thread_spec_ap.get() != NULL)
m_thread_spec_ap.reset (new ThreadSpec(*rhs.m_thread_spec_ap.get()));
diff --git a/lldb/source/Breakpoint/WatchpointOptions.cpp b/lldb/source/Breakpoint/WatchpointOptions.cpp
index 86ea411e4af..c2c9696c4ce 100644
--- a/lldb/source/Breakpoint/WatchpointOptions.cpp
+++ b/lldb/source/Breakpoint/WatchpointOptions.cpp
@@ -38,7 +38,7 @@ WatchpointOptions::WatchpointOptions() :
m_callback (WatchpointOptions::NullCallback),
m_callback_baton_sp (),
m_callback_is_synchronous (false),
- m_thread_spec_ap (NULL)
+ m_thread_spec_ap ()
{
}
@@ -49,7 +49,7 @@ WatchpointOptions::WatchpointOptions(const WatchpointOptions& rhs) :
m_callback (rhs.m_callback),
m_callback_baton_sp (rhs.m_callback_baton_sp),
m_callback_is_synchronous (rhs.m_callback_is_synchronous),
- m_thread_spec_ap (NULL)
+ m_thread_spec_ap ()
{
if (rhs.m_thread_spec_ap.get() != NULL)
m_thread_spec_ap.reset (new ThreadSpec(*rhs.m_thread_spec_ap.get()));
diff --git a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
index b1402c8bc61..da73ec64677 100644
--- a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
+++ b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
@@ -206,7 +206,7 @@ one command per line.\n" );
CommandReturnObject &result)
{
InputReaderSP reader_sp (new InputReader(m_interpreter.GetDebugger()));
- std::auto_ptr<BreakpointOptions::CommandData> data_ap(new BreakpointOptions::CommandData());
+ STD_UNIQUE_PTR(BreakpointOptions::CommandData) data_ap(new BreakpointOptions::CommandData());
if (reader_sp && data_ap.get())
{
BatonSP baton_sp (new BreakpointOptions::CommandBaton (data_ap.release()));
@@ -242,7 +242,7 @@ one command per line.\n" );
SetBreakpointCommandCallback (BreakpointOptions *bp_options,
const char *oneliner)
{
- std::auto_ptr<BreakpointOptions::CommandData> data_ap(new BreakpointOptions::CommandData());
+ STD_UNIQUE_PTR(BreakpointOptions::CommandData) data_ap(new BreakpointOptions::CommandData());
// It's necessary to set both user_source and script_source to the oneliner.
// The former is used to generate callback description (as in breakpoint command list)
diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp
index 7448a871dbd..d322d8c36f9 100644
--- a/lldb/source/Commands/CommandObjectCommands.cpp
+++ b/lldb/source/Commands/CommandObjectCommands.cpp
@@ -1066,7 +1066,7 @@ protected:
}
private:
- std::auto_ptr<CommandObjectRegexCommand> m_regex_cmd_ap;
+ STD_UNIQUE_PTR(CommandObjectRegexCommand) m_regex_cmd_ap;
class CommandOptions : public Options
{
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp
index 19b788258bb..ff0b04e4082 100644
--- a/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/lldb/source/Commands/CommandObjectTarget.cpp
@@ -4882,7 +4882,7 @@ protected:
target->AddStopHook (new_hook_sp);
// First step, make the specifier.
- std::auto_ptr<SymbolContextSpecifier> specifier_ap;
+ STD_UNIQUE_PTR(SymbolContextSpecifier) specifier_ap;
if (m_options.m_sym_ctx_specified)
{
specifier_ap.reset(new SymbolContextSpecifier(m_interpreter.GetDebugger().GetSelectedTarget()));
diff --git a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
index 18c31616a16..86bab6b19fd 100644
--- a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
+++ b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
@@ -190,7 +190,7 @@ but do NOT enter more than one command per line. \n" );
CommandReturnObject &result)
{
InputReaderSP reader_sp (new InputReader(m_interpreter.GetDebugger()));
- std::auto_ptr<WatchpointOptions::CommandData> data_ap(new WatchpointOptions::CommandData());
+ STD_UNIQUE_PTR(WatchpointOptions::CommandData) data_ap(new WatchpointOptions::CommandData());
if (reader_sp && data_ap.get())
{
BatonSP baton_sp (new WatchpointOptions::CommandBaton (data_ap.release()));
@@ -226,7 +226,7 @@ but do NOT enter more than one command per line. \n" );
SetWatchpointCommandCallback (WatchpointOptions *wp_options,
const char *oneliner)
{
- std::auto_ptr<WatchpointOptions::CommandData> data_ap(new WatchpointOptions::CommandData());
+ STD_UNIQUE_PTR(WatchpointOptions::CommandData) data_ap(new WatchpointOptions::CommandData());
// It's necessary to set both user_source and script_source to the oneliner.
// The former is used to generate callback description (as in watchpoint command list)
diff --git a/lldb/source/Core/Communication.cpp b/lldb/source/Core/Communication.cpp
index 51bf4c39706..6e1c545f066 100644
--- a/lldb/source/Core/Communication.cpp
+++ b/lldb/source/Core/Communication.cpp
@@ -108,7 +108,7 @@ Communication::Disconnect (Error *error_ptr)
// don't want to pay for the overhead it might cause if every time we
// access the connection we have to take a lock.
//
- // This auto_ptr will cleanup after itself when this object goes away,
+ // This unique pointer will cleanup after itself when this object goes away,
// so there is no need to currently have it destroy itself immediately
// upon disconnnect.
//connection_sp.reset();
diff --git a/lldb/source/Core/Disassembler.cpp b/lldb/source/Core/Disassembler.cpp
index 2a67f1db165..f2782bc49ad 100644
--- a/lldb/source/Core/Disassembler.cpp
+++ b/lldb/source/Core/Disassembler.cpp
@@ -638,7 +638,7 @@ Instruction::Dump (lldb_private::Stream *s,
bool
Instruction::DumpEmulation (const ArchSpec &arch)
{
- std::auto_ptr<EmulateInstruction> insn_emulator_ap (EmulateInstruction::FindPlugin (arch, eInstructionTypeAny, NULL));
+ STD_UNIQUE_PTR(EmulateInstruction) insn_emulator_ap (EmulateInstruction::FindPlugin (arch, eInstructionTypeAny, NULL));
if (insn_emulator_ap.get())
{
insn_emulator_ap->SetInstruction (GetOpcode(), GetAddress(), NULL);
@@ -904,7 +904,7 @@ Instruction::TestEmulation (Stream *out_stream, const char *file_name)
arch.SetTriple (llvm::Triple (value_sp->GetStringValue()));
bool success = false;
- std::auto_ptr<EmulateInstruction> insn_emulator_ap (EmulateInstruction::FindPlugin (arch, eInstructionTypeAny, NULL));
+ STD_UNIQUE_PTR(EmulateInstruction) insn_emulator_ap (EmulateInstruction::FindPlugin (arch, eInstructionTypeAny, NULL));
if (insn_emulator_ap.get())
success = insn_emulator_ap->TestEmulation (out_stream, arch, data_dictionary);
@@ -925,7 +925,7 @@ Instruction::Emulate (const ArchSpec &arch,
EmulateInstruction::ReadRegisterCallback read_reg_callback,
EmulateInstruction::WriteRegisterCallback write_reg_callback)
{
- std::auto_ptr<EmulateInstruction> insn_emulator_ap (EmulateInstruction::FindPlugin (arch, eInstructionTypeAny, NULL));
+ STD_UNIQUE_PTR(EmulateInstruction) insn_emulator_ap (EmulateInstruction::FindPlugin (arch, eInstructionTypeAny, NULL));
if (insn_emulator_ap.get())
{
insn_emulator_ap->SetBaton (baton);
diff --git a/lldb/source/Core/DynamicLoader.cpp b/lldb/source/Core/DynamicLoader.cpp
index 17a796fee9d..1e52acce38c 100644
--- a/lldb/source/Core/DynamicLoader.cpp
+++ b/lldb/source/Core/DynamicLoader.cpp
@@ -24,7 +24,7 @@ DynamicLoader::FindPlugin (Process *process, const char *plugin_name)
create_callback = PluginManager::GetDynamicLoaderCreateCallbackForPluginName (plugin_name);
if (create_callback)
{
- std::auto_ptr<DynamicLoader> instance_ap(create_callback(process, true));
+ STD_UNIQUE_PTR(DynamicLoader) instance_ap(create_callback(process, true));
if (instance_ap.get())
return instance_ap.release();
}
@@ -33,7 +33,7 @@ DynamicLoader::FindPlugin (Process *process, const char *plugin_name)
{
for (uint32_t idx = 0; (create_callback = PluginManager::GetDynamicLoaderCreateCallbackAtIndex(idx)) != NULL; ++idx)
{
- std::auto_ptr<DynamicLoader> instance_ap(create_callback(process, false));
+ STD_UNIQUE_PTR(DynamicLoader) instance_ap(create_callback(process, false));
if (instance_ap.get())
return instance_ap.release();
}
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp
index 151e611b71b..3c1dfbfb3c6 100644
--- a/lldb/source/Core/Module.cpp
+++ b/lldb/source/Core/Module.cpp
@@ -254,7 +254,7 @@ Module::GetMemoryObjectFile (const lldb::ProcessSP &process_sp, lldb::addr_t hea
if (process_sp)
{
m_did_load_objfile = true;
- std::auto_ptr<DataBufferHeap> data_ap (new DataBufferHeap (512, 0));
+ STD_UNIQUE_PTR(DataBufferHeap) data_ap (new DataBufferHeap (512, 0));
Error readmem_error;
const size_t bytes_read = process_sp->ReadMemory (header_addr,
data_ap->GetBytes(),
@@ -1185,6 +1185,15 @@ Module::GetModificationTime () const
return m_mod_time;
}
+void
+Module::SetSymbolFileFileSpec (const FileSpec &file)
+{
+ m_symfile_spec = file;
+ m_symfile_ap.reset();
+ m_did_load_symbol_vendor = false;
+}
+
+
bool
Module::IsExecutable ()
{
diff --git a/lldb/source/Core/StreamAsynchronousIO.cpp b/lldb/source/Core/StreamAsynchronousIO.cpp
index d6ab0d85725..5e14d13e9a6 100644
--- a/lldb/source/Core/StreamAsynchronousIO.cpp
+++ b/lldb/source/Core/StreamAsynchronousIO.cpp
@@ -35,7 +35,7 @@ StreamAsynchronousIO::Flush ()
{
if (m_accumulated_data.GetSize() > 0)
{
- std::auto_ptr<EventDataBytes> data_bytes_ap (new EventDataBytes);
+ STD_UNIQUE_PTR(EventDataBytes) data_bytes_ap (new EventDataBytes);
// Let's swap the bytes to avoid LARGE string copies.
data_bytes_ap->SwapBytes (m_accumulated_data.GetString());
EventSP new_event_sp (new Event (m_broadcast_event_type, data_bytes_ap.release()));
diff --git a/lldb/source/Expression/ClangExpressionDeclMap.cpp b/lldb/source/Expression/ClangExpressionDeclMap.cpp
index f72feb4835a..ec2dbf6b8a0 100644
--- a/lldb/source/Expression/ClangExpressionDeclMap.cpp
+++ b/lldb/source/Expression/ClangExpressionDeclMap.cpp
@@ -1117,7 +1117,7 @@ ClangExpressionDeclMap::LookupDecl (clang::NamedDecl *decl, ClangExpressionVaria
if (parser_vars->m_lldb_var)
{
- std::auto_ptr<Value> value(GetVariableValue(parser_vars->m_lldb_var, NULL));
+ STD_UNIQUE_PTR(Value) value(GetVariableValue(parser_vars->m_lldb_var, NULL));
if (is_reference && value.get() && value->GetValueType() == Value::eValueTypeLoadAddress)
{
@@ -1252,7 +1252,7 @@ ClangExpressionDeclMap::GetSpecialValue (const ConstString &name)
!var->LocationIsValidForFrame (frame))
return Value();
- std::auto_ptr<Value> value(GetVariableValue(var, NULL));
+ STD_UNIQUE_PTR(Value) value(GetVariableValue(var, NULL));
if (value.get() && value->GetValueType() == Value::eValueTypeLoadAddress)
{
@@ -1347,7 +1347,7 @@ ClangExpressionDeclMap::GetObjectPointer
return false;
}
- std::auto_ptr<lldb_private::Value> location_value(GetVariableValue(object_ptr_var,
+ STD_UNIQUE_PTR(lldb_private::Value) location_value(GetVariableValue(object_ptr_var,
NULL));
if (!location_value.get())
@@ -2534,7 +2534,7 @@ ClangExpressionDeclMap::GetVariableValue
DWARFExpression &var_location_expr = var->LocationExpression();
- std::auto_ptr<Value> var_location(new Value);
+ STD_UNIQUE_PTR(Value) var_location(new Value);
lldb::addr_t loclist_base_load_addr = LLDB_INVALID_ADDRESS;
@@ -2756,7 +2756,7 @@ ClangExpressionDeclMap::AddOneGenericVariable(NameSearchContext &context,
m_parser_vars->m_target_info.address_byte_size));
assert (entity.get());
- std::auto_ptr<Value> symbol_location(new Value);
+ STD_UNIQUE_PTR(Value) symbol_location(new Value);
const Address &symbol_address = symbol.GetAddress();
lldb::addr_t symbol_load_addr = symbol_address.GetLoadAddress(target);
@@ -2900,7 +2900,7 @@ ClangExpressionDeclMap::AddOneFunction (NameSearchContext &context,
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
NamedDecl *fun_decl = NULL;
- std::auto_ptr<Value> fun_location(new Value);
+ STD_UNIQUE_PTR(Value) fun_location(new Value);
const Address *fun_address = NULL;
// only valid for Functions, not for Symbols
diff --git a/lldb/source/Expression/ClangExpressionParser.cpp b/lldb/source/Expression/ClangExpressionParser.cpp
index 59b00bf5f04..2922898a0ca 100644
--- a/lldb/source/Expression/ClangExpressionParser.cpp
+++ b/lldb/source/Expression/ClangExpressionParser.cpp
@@ -188,7 +188,7 @@ ClangExpressionParser::ClangExpressionParser (ExecutionContextScope *exe_scope,
ClangExpression &expr) :
m_expr (expr),
m_compiler (),
- m_code_generator (NULL)
+ m_code_generator ()
{
// Initialize targets first, so that --version shows registered targets.
static struct InitializeLLVM {
@@ -351,13 +351,13 @@ ClangExpressionParser::ClangExpressionParser (ExecutionContextScope *exe_scope,
m_selector_table.reset(new SelectorTable());
m_builtin_context.reset(new Builtin::Context());
- std::auto_ptr<clang::ASTContext> ast_context(new ASTContext(m_compiler->getLangOpts(),
- m_compiler->getSourceManager(),
- &m_compiler->getTarget(),
- m_compiler->getPreprocessor().getIdentifierTable(),
- *m_selector_table.get(),
- *m_builtin_context.get(),
- 0));
+ STD_UNIQUE_PTR(clang::ASTContext) ast_context(new ASTContext(m_compiler->getLangOpts(),
+ m_compiler->getSourceManager(),
+ &m_compiler->getTarget(),
+ m_compiler->getPreprocessor().getIdentifierTable(),
+ *m_selector_table.get(),
+ *m_builtin_context.get(),
+ 0));
ClangExpressionDeclMap *decl_map = m_expr.DeclMap();
@@ -462,7 +462,7 @@ static bool FindFunctionInModule (ConstString &mangled_name,
Error
ClangExpressionParser::PrepareForExecution (lldb::addr_t &func_addr,
lldb::addr_t &func_end,
- std::auto_ptr<IRExecutionUnit> &execution_unit_ap,
+ STD_UNIQUE_PTR(IRExecutionUnit) &execution_unit_ap,
ExecutionContext &exe_ctx,
bool &evaluated_statically,
lldb::ClangExpressionVariableSP &const_result,
@@ -472,11 +472,11 @@ ClangExpressionParser::PrepareForExecution (lldb::addr_t &func_addr,
func_end = LLDB_INVALID_ADDRESS;
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
- std::auto_ptr<llvm::ExecutionEngine> execution_engine_ap;
+ STD_UNIQUE_PTR(llvm::ExecutionEngine) execution_engine_ap;
Error err;
- std::auto_ptr<llvm::Module> module_ap (m_code_generator->ReleaseModule());
+ STD_UNIQUE_PTR(llvm::Module) module_ap (m_code_generator->ReleaseModule());
if (!module_ap.get())
{
@@ -596,7 +596,7 @@ ClangExpressionParser::PrepareForExecution (lldb::addr_t &func_addr,
m_execution_unit->GetRunnableInfo(err, func_addr, func_end);
- execution_unit_ap = m_execution_unit;
+ execution_unit_ap.reset (m_execution_unit.release());
return err;
}
diff --git a/lldb/source/Expression/ClangFunction.cpp b/lldb/source/Expression/ClangFunction.cpp
index 74fb0c0e806..c0131b06a58 100644
--- a/lldb/source/Expression/ClangFunction.cpp
+++ b/lldb/source/Expression/ClangFunction.cpp
@@ -25,6 +25,7 @@
#include "lldb/Expression/ASTStructExtractor.h"
#include "lldb/Expression/ClangExpressionParser.h"
#include "lldb/Expression/ClangFunction.h"
+#include "lldb/Expression/IRExecutionUnit.h"
#include "lldb/Symbol/Type.h"
#include "lldb/Core/DataExtractor.h"
#include "lldb/Core/State.h"
diff --git a/lldb/source/Expression/ClangUserExpression.cpp b/lldb/source/Expression/ClangUserExpression.cpp
index 1a11b977838..6f65b11a686 100644
--- a/lldb/source/Expression/ClangUserExpression.cpp
+++ b/lldb/source/Expression/ClangUserExpression.cpp
@@ -396,7 +396,7 @@ ClangUserExpression::Parse (Stream &error_stream,
ApplyObjcCastHack(m_expr_text);
//ApplyUnicharHack(m_expr_text);
- std::auto_ptr <ExpressionSourceCode> source_code (ExpressionSourceCode::CreateWrapped(m_expr_prefix.c_str(), m_expr_text.c_str()));
+ STD_UNIQUE_PTR(ExpressionSourceCode) source_code (ExpressionSourceCode::CreateWrapped(m_expr_prefix.c_str(), m_expr_text.c_str()));
lldb::LanguageType lang_type;
diff --git a/lldb/source/Expression/ClangUtilityFunction.cpp b/lldb/source/Expression/ClangUtilityFunction.cpp
index 3fcc2490725..aed0e244e7f 100644
--- a/lldb/source/Expression/ClangUtilityFunction.cpp
+++ b/lldb/source/Expression/ClangUtilityFunction.cpp
@@ -23,6 +23,7 @@
#include "lldb/Expression/ClangExpressionParser.h"
#include "lldb/Expression/ClangUtilityFunction.h"
#include "lldb/Expression/ExpressionSourceCode.h"
+#include "lldb/Expression/IRExecutionUnit.h"
#include "lldb/Host/Host.h"
#include "lldb/Target/ExecutionContext.h"
#include "lldb/Target/Target.h"
diff --git a/lldb/source/Expression/DWARFExpression.cpp b/lldb/source/Expression/DWARFExpression.cpp
index c9e03519449..c3451a49590 100644
--- a/lldb/source/Expression/DWARFExpression.cpp
+++ b/lldb/source/Expression/DWARFExpression.cpp
@@ -1062,8 +1062,8 @@ DWARFExpression::Update_DW_OP_addr (lldb::addr_t file_addr)
// we then replace the data for this expression
// So first we copy the data into a heap buffer
- std::auto_ptr<DataBufferHeap> head_data_ap (new DataBufferHeap (m_data.GetDataStart(),
- m_data.GetByteSize()));
+ STD_UNIQUE_PTR(DataBufferHeap) head_data_ap (new DataBufferHeap (m_data.GetDataStart(),
+ m_data.GetByteSize()));
// Make en encoder so we can write the address into the buffer using
// the correct byte order (endianness)
diff --git a/lldb/source/Expression/IRExecutionUnit.cpp b/lldb/source/Expression/IRExecutionUnit.cpp
index 206a6a394f2..d6dfe949731 100644
--- a/lldb/source/Expression/IRExecutionUnit.cpp
+++ b/lldb/source/Expression/IRExecutionUnit.cpp
@@ -25,14 +25,14 @@
using namespace lldb_private;
-IRExecutionUnit::IRExecutionUnit (std::auto_ptr<llvm::LLVMContext> &context_ap,
- std::auto_ptr<llvm::Module> &module_ap,
+IRExecutionUnit::IRExecutionUnit (STD_UNIQUE_PTR(llvm::LLVMContext) &context_ap,
+ STD_UNIQUE_PTR(llvm::Module) &module_ap,
ConstString &name,
const lldb::TargetSP &target_sp,
std::vector<std::string> &cpu_features) :
IRMemoryMap(target_sp),
- m_context_ap(context_ap),
- m_module_ap(module_ap),
+ m_context_ap(context_ap.release()),
+ m_module_ap(module_ap.release()),
m_module(m_module_ap.get()),
m_cpu_features(cpu_features),
m_name(name),
diff --git a/lldb/source/Expression/IRInterpreter.cpp b/lldb/source/Expression/IRInterpreter.cpp
index 419165c79b1..622156302ae 100644
--- a/lldb/source/Expression/IRInterpreter.cpp
+++ b/lldb/source/Expression/IRInterpreter.cpp
@@ -817,7 +817,7 @@ IRInterpreter::maybeRunOnFunction (lldb_private::ClangExpressionDeclMap *decl_ma
}
static const char *unsupported_opcode_error = "Interpreter doesn't handle one of the expression's opcodes";
-static const char *interpreter_initialization_error = "Interpreter couldn't be initialized";
+//static const char *interpreter_initialization_error = "Interpreter couldn't be initialized";
static const char *interpreter_internal_error = "Interpreter encountered an internal error";
static const char *bad_value_error = "Interpreter couldn't resolve a value during execution";
static const char *memory_allocation_error = "Interpreter couldn't allocate memory";
diff --git a/lldb/source/Host/common/File.cpp b/lldb/source/Host/common/File.cpp
index ae0bf887974..f818123c296 100644
--- a/lldb/source/Host/common/File.cpp
+++ b/lldb/source/Host/common/File.cpp
@@ -556,7 +556,7 @@ File::Read (size_t &num_bytes, off_t &offset, bool null_terminate, DataBufferSP
if (num_bytes > bytes_left)
num_bytes = bytes_left;
- std::auto_ptr<DataBufferHeap> data_heap_ap;
+ STD_UNIQUE_PTR(DataBufferHeap) data_heap_ap;
data_heap_ap.reset(new DataBufferHeap(num_bytes + (null_terminate ? 1 : 0), '\0'));
if (data_heap_ap.get())
diff --git a/lldb/source/Host/common/FileSpec.cpp b/lldb/source/Host/common/FileSpec.cpp
index c8cb96cc565..fab7ea1eccb 100644
--- a/lldb/source/Host/common/FileSpec.cpp
+++ b/lldb/source/Host/common/FileSpec.cpp
@@ -35,7 +35,6 @@
using namespace lldb;
using namespace lldb_private;
-using namespace std;
static bool
GetFileStats (const FileSpec *file_spec, struct stat *stats_ptr)
@@ -745,7 +744,7 @@ DataBufferSP
FileSpec::MemoryMapFileContents(off_t file_offset, size_t file_size) const
{
DataBufferSP data_sp;
- auto_ptr<DataBufferMemoryMap> mmap_data(new DataBufferMemoryMap());
+ STD_UNIQUE_PTR(DataBufferMemoryMap) mmap_data(new DataBufferMemoryMap());
if (mmap_data.get())
{
if (mmap_data->MemoryMapFromFileSpec (this, file_offset, file_size) >= file_size)
@@ -863,7 +862,7 @@ FileSpec::ReadFileLines (STLStringArray &lines)
char path[PATH_MAX];
if (GetPath(path, sizeof(path)))
{
- ifstream file_stream (path);
+ std::ifstream file_stream (path);
if (file_stream)
{
diff --git a/lldb/source/Host/common/Host.cpp b/lldb/source/Host/common/Host.cpp
index 61386b5833b..90de94cf10c 100644
--- a/lldb/source/Host/common/Host.cpp
+++ b/lldb/source/Host/common/Host.cpp
@@ -1313,7 +1313,7 @@ Host::RunShellCommand (const char *command,
}
// The process monitor callback will delete the 'shell_info_ptr' below...
- std::auto_ptr<ShellInfo> shell_info_ap (new ShellInfo());
+ STD_UNIQUE_PTR(ShellInfo) shell_info_ap (new ShellInfo());
const bool monitor_signals = false;
launch_info.SetMonitorProcessCallback(MonitorShellCommand, shell_info_ap.get(), monitor_signals);
@@ -1324,7 +1324,7 @@ Host::RunShellCommand (const char *command,
{
// The process successfully launched, so we can defer ownership of
// "shell_info" to the MonitorShellCommand callback function that will
- // get called when the process dies. We release the std::auto_ptr as it
+ // get called when the process dies. We release the unique pointer as it
// doesn't need to delete the ShellInfo anymore.
ShellInfo *shell_info = shell_info_ap.release();
TimeValue timeout_time(TimeValue::Now());
diff --git a/lldb/source/Host/freebsd/Host.cpp b/lldb/source/Host/freebsd/Host.cpp
index 3e787cfba02..453bcf5f1cf 100644
--- a/lldb/source/Host/freebsd/Host.cpp
+++ b/lldb/source/Host/freebsd/Host.cpp
@@ -294,7 +294,7 @@ Host::GetAuxvData(lldb_private::Process *process)
struct ps_strings ps_strings;
struct ptrace_io_desc pid;
DataBufferSP buf_sp;
- std::auto_ptr<DataBufferHeap> buf_ap(new DataBufferHeap(1024, 0));
+ STD_UNIQUE_PTR(DataBufferHeap) buf_ap(new DataBufferHeap(1024, 0));
if (::sysctl(mib, 2, &ps_strings_addr, &ps_strings_size, NULL, 0) == 0) {
pid.piod_op = PIOD_READ_D;
diff --git a/lldb/source/Host/linux/Host.cpp b/lldb/source/Host/linux/Host.cpp
index a418f38eb08..f90345e13aa 100644
--- a/lldb/source/Host/linux/Host.cpp
+++ b/lldb/source/Host/linux/Host.cpp
@@ -72,7 +72,7 @@ Host::GetAuxvData(lldb_private::Process *process)
return buf_sp;
size_t bytes_read = 0;
- std::auto_ptr<DataBufferHeap> buf_ap(new DataBufferHeap(1024, 0));
+ STD_UNIQUE_PTR(DataBufferHeap) buf_ap(new DataBufferHeap(1024, 0));
for (;;)
{
size_t avail = buf_ap->GetByteSize() - bytes_read;
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index 72a9df91050..661512c222b 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -391,7 +391,7 @@ CommandInterpreter::LoadCommandDictionary ()
size_t num_regexes = sizeof break_regexes/sizeof(char *[2]);
- std::auto_ptr<CommandObjectRegexCommand>
+ STD_UNIQUE_PTR(CommandObjectRegexCommand)
break_regex_cmd_ap(new CommandObjectRegexCommand (*this,
"_regexp-break",
"Set a breakpoint using a regular expression to specify the location, where <linenum> is in decimal and <address> is in hex.",
@@ -418,7 +418,7 @@ CommandInterpreter::LoadCommandDictionary ()
}
}
- std::auto_ptr<CommandObjectRegexCommand>
+ STD_UNIQUE_PTR(CommandObjectRegexCommand)
tbreak_regex_cmd_ap(new CommandObjectRegexCommand (*this,
"_regexp-tbreak",
"Set a one shot breakpoint using a regular expression to specify the location, where <linenum> is in decimal and <address> is in hex.",
@@ -449,7 +449,7 @@ CommandInterpreter::LoadCommandDictionary ()
}
}
- std::auto_ptr<CommandObjectRegexCommand>
+ STD_UNIQUE_PTR(CommandObjectRegexCommand)
attach_regex_cmd_ap(new CommandObjectRegexCommand (*this,
"_regexp-attach",
"Attach to a process id if in decimal, otherwise treat the argument as a process name to attach to.",
@@ -467,7 +467,7 @@ CommandInterpreter::LoadCommandDictionary ()
}
}
- std::auto_ptr<CommandObjectRegexCommand>
+ STD_UNIQUE_PTR(CommandObjectRegexCommand)
down_regex_cmd_ap(new CommandObjectRegexCommand (*this,
"_regexp-down",
"Go down \"n\" frames in the stack (1 frame by default).",
@@ -482,7 +482,7 @@ CommandInterpreter::LoadCommandDictionary ()
}
}
- std::auto_ptr<CommandObjectRegexCommand>
+ STD_UNIQUE_PTR(CommandObjectRegexCommand)
up_regex_cmd_ap(new CommandObjectRegexCommand (*this,
"_regexp-up",
"Go up \"n\" frames in the stack (1 frame by default).",
@@ -497,7 +497,7 @@ CommandInterpreter::LoadCommandDictionary ()
}
}
- std::auto_ptr<CommandObjectRegexCommand>
+ STD_UNIQUE_PTR(CommandObjectRegexCommand)
display_regex_cmd_ap(new CommandObjectRegexCommand (*this,
"_regexp-display",
"Add an expression evaluation stop-hook.",
@@ -511,7 +511,7 @@ CommandInterpreter::LoadCommandDictionary ()
}
}
- std::auto_ptr<CommandObjectRegexCommand>
+ STD_UNIQUE_PTR(CommandObjectRegexCommand)
undisplay_regex_cmd_ap(new CommandObjectRegexCommand (*this,
"_regexp-undisplay",
"Remove an expression evaluation stop-hook.",
@@ -525,7 +525,7 @@ CommandInterpreter::LoadCommandDictionary ()
}
}
- std::auto_ptr<CommandObjectRegexCommand>
+ STD_UNIQUE_PTR(CommandObjectRegexCommand)
connect_gdb_remote_cmd_ap(new CommandObjectRegexCommand (*this,
"gdb-remote",
"Connect to a remote GDB server. If no hostname is provided, localhost is assumed.",
@@ -540,7 +540,7 @@ CommandInterpreter::LoadCommandDictionary ()
}
}
- std::auto_ptr<CommandObjectRegexCommand>
+ STD_UNIQUE_PTR(CommandObjectRegexCommand)
connect_kdp_remote_cmd_ap(new CommandObjectRegexCommand (*this,
"kdp-remote",
"Connect to a remote KDP server. udp port 41139 is the default port number.",
@@ -555,7 +555,7 @@ CommandInterpreter::LoadCommandDictionary ()
}
}
- std::auto_ptr<CommandObjectRegexCommand>
+ STD_UNIQUE_PTR(CommandObjectRegexCommand)
bt_regex_cmd_ap(new CommandObjectRegexCommand (*this,
"_regexp-bt",
"Show a backtrace. An optional argument is accepted; if that argument is a number, it specifies the number of frames to display. If that argument is 'all', full backtraces of all threads are displayed.",
@@ -575,7 +575,7 @@ CommandInterpreter::LoadCommandDictionary ()
}
}
- std::auto_ptr<CommandObjectRegexCommand>
+ STD_UNIQUE_PTR(CommandObjectRegexCommand)
list_regex_cmd_ap(new CommandObjectRegexCommand (*this,
"_regexp-list",
"Implements the GDB 'list' command in all of its forms except FILE:FUNCTION and maps them to the appropriate 'source list' commands.",
@@ -597,7 +597,7 @@ CommandInterpreter::LoadCommandDictionary ()
}
}
- std::auto_ptr<CommandObjectRegexCommand>
+ STD_UNIQUE_PTR(CommandObjectRegexCommand)
env_regex_cmd_ap(new CommandObjectRegexCommand (*this,
"_regexp-env",
"Implements a shortcut to viewing and setting environment variables.",
diff --git a/lldb/source/Interpreter/Options.cpp b/lldb/source/Interpreter/Options.cpp
index 6b509d40ef8..9b4211bd508 100644
--- a/lldb/source/Interpreter/Options.cpp
+++ b/lldb/source/Interpreter/Options.cpp
@@ -901,7 +901,7 @@ Options::HandleOptionArgumentCompletion
)
{
const OptionDefinition *opt_defs = GetDefinitions();
- std::auto_ptr<SearchFilter> filter_ap;
+ STD_UNIQUE_PTR(SearchFilter) filter_ap;
int opt_arg_pos = opt_element_vector[opt_element_index].opt_arg_pos;
int opt_defs_index = opt_element_vector[opt_element_index].opt_defs_index;
diff --git a/lldb/source/Interpreter/ScriptInterpreter.cpp b/lldb/source/Interpreter/ScriptInterpreter.cpp
index 0e85902cff2..0609cf9978f 100644
--- a/lldb/source/Interpreter/ScriptInterpreter.cpp
+++ b/lldb/source/Interpreter/ScriptInterpreter.cpp
@@ -81,10 +81,10 @@ ScriptInterpreter::LanguageToString (lldb::ScriptLanguage language)
return return_value;
}
-std::auto_ptr<ScriptInterpreterLocker>
+STD_UNIQUE_PTR(ScriptInterpreterLocker)
ScriptInterpreter::AcquireInterpreterLock ()
{
- return std::auto_ptr<ScriptInterpreterLocker>(new ScriptInterpreterLocker());
+ return STD_UNIQUE_PTR(ScriptInterpreterLocker)(new ScriptInterpreterLocker());
}
void
diff --git a/lldb/source/Interpreter/ScriptInterpreterPython.cpp b/lldb/source/Interpreter/ScriptInterpreterPython.cpp
index d56f21eed1d..260a6c3ad3f 100644
--- a/lldb/source/Interpreter/ScriptInterpreterPython.cpp
+++ b/lldb/source/Interpreter/ScriptInterpreterPython.cpp
@@ -1321,7 +1321,7 @@ ScriptInterpreterPython::GenerateBreakpointOptionsCommandCallback
case eInputReaderDone:
{
BreakpointOptions *bp_options = (BreakpointOptions *)baton;
- std::auto_ptr<BreakpointOptions::CommandData> data_ap(new BreakpointOptions::CommandData());
+ STD_UNIQUE_PTR(BreakpointOptions::CommandData) data_ap(new BreakpointOptions::CommandData());
data_ap->user_source.AppendList (commands_in_progress);
if (data_ap.get())
{
@@ -1427,7 +1427,7 @@ ScriptInterpreterPython::GenerateWatchpointOptionsCommandCallback
case eInputReaderDone:
{
WatchpointOptions *wp_options = (WatchpointOptions *)baton;
- std::auto_ptr<WatchpointOptions::CommandData> data_ap(new WatchpointOptions::CommandData());
+ STD_UNIQUE_PTR(WatchpointOptions::CommandData) data_ap(new WatchpointOptions::CommandData());
data_ap->user_source.AppendList (commands_in_progress);
if (data_ap.get())
{
@@ -1534,7 +1534,7 @@ void
ScriptInterpreterPython::SetBreakpointCommandCallback (BreakpointOptions *bp_options,
const char *oneliner)
{
- std::auto_ptr<BreakpointOptions::CommandData> data_ap(new BreakpointOptions::CommandData());
+ STD_UNIQUE_PTR(BreakpointOptions::CommandData) data_ap(new BreakpointOptions::CommandData());
// It's necessary to set both user_source and script_source to the oneliner.
// The former is used to generate callback description (as in breakpoint command list)
@@ -1557,7 +1557,7 @@ void
ScriptInterpreterPython::SetWatchpointCommandCallback (WatchpointOptions *wp_options,
const char *oneliner)
{
- std::auto_ptr<WatchpointOptions::CommandData> data_ap(new WatchpointOptions::CommandData());
+ STD_UNIQUE_PTR(WatchpointOptions::CommandData) data_ap(new WatchpointOptions::CommandData());
// It's necessary to set both user_source and script_source to the oneliner.
// The former is used to generate callback description (as in watchpoint command list)
@@ -2807,10 +2807,10 @@ ScriptInterpreterPython::GetDocumentationForItem(const char* item, std::string&
}
}
-std::auto_ptr<ScriptInterpreterLocker>
+STD_UNIQUE_PTR(ScriptInterpreterLocker)
ScriptInterpreterPython::AcquireInterpreterLock ()
{
- std::auto_ptr<ScriptInterpreterLocker> py_lock(new Locker(this,
+ STD_UNIQUE_PTR(ScriptInterpreterLocker) py_lock(new Locker(this,
Locker::AcquireLock | Locker::InitSession,
Locker::FreeLock | Locker::TearDownSession));
return py_lock;
diff --git a/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp b/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
index 9eb22fdf4b5..b9f7936c4e0 100644
--- a/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
+++ b/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
@@ -472,6 +472,10 @@ DisassemblerLLVMC::LLVMCDisassembler::LLVMCDisassembler (const char *triple, uns
m_is_valid = false;
}
+DisassemblerLLVMC::LLVMCDisassembler::~LLVMCDisassembler()
+{
+}
+
namespace {
// This is the memory object we use in GetInstruction.
class LLDBDisasmMemoryObject : public llvm::MemoryObject {
@@ -563,7 +567,7 @@ DisassemblerLLVMC::CreateInstance (const ArchSpec &arch, const char *flavor)
{
if (arch.GetTriple().getArch() != llvm::Triple::UnknownArch)
{
- std::auto_ptr<DisassemblerLLVMC> disasm_ap (new DisassemblerLLVMC(arch, flavor));
+ STD_UNIQUE_PTR(DisassemblerLLVMC) disasm_ap (new DisassemblerLLVMC(arch, flavor));
if (disasm_ap.get() && disasm_ap->IsValid())
return disasm_ap.release();
diff --git a/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h b/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h
index 7428b6b13e2..4b9cee2a608 100644
--- a/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h
+++ b/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h
@@ -43,7 +43,7 @@ class DisassemblerLLVMC : public lldb_private::Disassembler
public:
LLVMCDisassembler (const char *triple, unsigned flavor, DisassemblerLLVMC &owner);
- ~LLVMCDisassembler() {};
+ ~LLVMCDisassembler();
uint64_t GetMCInst (const uint8_t *opcode_data, size_t opcode_data_len, lldb::addr_t pc, llvm::MCInst &mc_inst);
uint64_t PrintMCInst (llvm::MCInst &mc_inst, char *output_buffer, size_t out_buffer_len);
@@ -54,14 +54,14 @@ class DisassemblerLLVMC : public lldb_private::Disassembler
}
private:
- bool m_is_valid;
- std::auto_ptr<llvm::MCContext> m_context_ap;
- std::auto_ptr<llvm::MCAsmInfo> m_asm_info_ap;
- std::auto_ptr<llvm::MCSubtargetInfo> m_subtarget_info_ap;
- std::auto_ptr<llvm::MCInstrInfo> m_instr_info_ap;
- std::auto_ptr<llvm::MCRegisterInfo> m_reg_info_ap;
- std::auto_ptr<llvm::MCInstPrinter> m_instr_printer_ap;
- std::auto_ptr<llvm::MCDisassembler> m_disasm_ap;
+ bool m_is_valid;
+ STD_UNIQUE_PTR(llvm::MCContext) m_context_ap;
+ STD_UNIQUE_PTR(llvm::MCAsmInfo) m_asm_info_ap;
+ STD_UNIQUE_PTR(llvm::MCSubtargetInfo) m_subtarget_info_ap;
+ STD_UNIQUE_PTR(llvm::MCInstrInfo) m_instr_info_ap;
+ STD_UNIQUE_PTR(llvm::MCRegisterInfo) m_reg_info_ap;
+ STD_UNIQUE_PTR(llvm::MCInstPrinter) m_instr_printer_ap;
+ STD_UNIQUE_PTR(llvm::MCDisassembler) m_disasm_ap;
};
public:
@@ -164,8 +164,8 @@ protected:
lldb_private::Mutex m_mutex;
bool m_data_from_file;
- std::auto_ptr<LLVMCDisassembler> m_disasm_ap;
- std::auto_ptr<LLVMCDisassembler> m_alternate_disasm_ap;
+ STD_UNIQUE_PTR(LLVMCDisassembler) m_disasm_ap;
+ STD_UNIQUE_PTR(LLVMCDisassembler) m_alternate_disasm_ap;
};
#endif // liblldb_DisassemblerLLVM_h_
diff --git a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
index 2f3c4e4e06c..88941955847 100644
--- a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
+++ b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
@@ -98,7 +98,7 @@ DynamicLoaderPOSIXDYLD::DynamicLoaderPOSIXDYLD(Process *process)
m_rendezvous(process),
m_load_offset(LLDB_INVALID_ADDRESS),
m_entry_point(LLDB_INVALID_ADDRESS),
- m_auxv(NULL)
+ m_auxv()
{
}
diff --git a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h
index 4c9cbe534f2..3402afbc585 100644
--- a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h
+++ b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h
@@ -93,7 +93,7 @@ protected:
lldb::addr_t m_entry_point;
/// Auxiliary vector of the inferior process.
- std::auto_ptr<AuxVector> m_auxv;
+ STD_UNIQUE_PTR(AuxVector) m_auxv;
/// Enables a breakpoint on a function called by the runtime
/// linker each time a module is loaded or unloaded.
diff --git a/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp b/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
index 5aadfe3e26c..8bceba69f40 100644
--- a/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
+++ b/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
@@ -193,14 +193,14 @@ EmulateInstructionARM::CreateInstance (const ArchSpec &arch, InstructionType ins
{
if (arch.GetTriple().getArch() == llvm::Triple::arm)
{
- std::auto_ptr<EmulateInstructionARM> emulate_insn_ap (new EmulateInstructionARM (arch));
+ STD_UNIQUE_PTR(EmulateInstructionARM) emulate_insn_ap (new EmulateInstructionARM (arch));
if (emulate_insn_ap.get())
return emulate_insn_ap.release();
}
else if (arch.GetTriple().getArch() == llvm::Triple::thumb)
{
- std::auto_ptr<EmulateInstructionARM> emulate_insn_ap (new EmulateInstructionARM (arch));
+ STD_UNIQUE_PTR(EmulateInstructionARM) emulate_insn_ap (new EmulateInstructionARM (arch));
if (emulate_insn_ap.get())
return emulate_insn_ap.release();
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h
index d9dd5a69be9..7eaf5ac04d4 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h
@@ -104,17 +104,19 @@ protected:
Address *
GetPrintForDebuggerAddr();
- std::auto_ptr<Address> m_PrintForDebugger_addr;
+ STD_UNIQUE_PTR(Address) m_PrintForDebugger_addr;
bool m_read_objc_library;
- std::auto_ptr<lldb_private::AppleObjCTrampolineHandler> m_objc_trampoline_handler_ap;
+ STD_UNIQUE_PTR(lldb_private::AppleObjCTrampolineHandler) m_objc_trampoline_handler_ap;
lldb::BreakpointSP m_objc_exception_bp_sp;
lldb::ModuleWP m_objc_module_wp;
AppleObjCRuntime(Process *process) :
lldb_private::ObjCLanguageRuntime(process),
m_read_objc_library (false),
- m_objc_trampoline_handler_ap(NULL)
- { } // Call CreateInstance instead.
+ m_objc_trampoline_handler_ap ()
+ {
+ // Call CreateInstance instead.
+ }
};
} // namespace lldb_private
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
index 944cc3507ac..ca239db43bb 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
@@ -150,7 +150,7 @@ struct BufStruct {
ClangUtilityFunction *
AppleObjCRuntimeV1::CreateObjectChecker(const char *name)
{
- std::auto_ptr<BufStruct> buf(new BufStruct);
+ STD_UNIQUE_PTR(BufStruct) buf(new BufStruct);
assert(snprintf(&buf->contents[0], sizeof(buf->contents),
"struct __objc_class \n"
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h
index 419bae998b2..e84f5ff42ec 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h
@@ -184,7 +184,7 @@ protected:
HashTableSignature m_hash_signature;
lldb::addr_t m_isa_hash_table_ptr;
- std::auto_ptr<TypeVendor> m_type_vendor_ap;
+ STD_UNIQUE_PTR(TypeVendor) m_type_vendor_ap;
private:
AppleObjCRuntimeV1(Process *process);
};
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
index 31916937c0b..7ab38f91770 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
@@ -11,7 +11,6 @@
#include <string>
#include <vector>
-#include <memory>
#include <stdint.h>
#include "lldb/lldb-enumerations.h"
@@ -309,6 +308,10 @@ AppleObjCRuntimeV2::AppleObjCRuntimeV2 (Process *process,
m_has_object_getClass = (objc_module_sp->FindFirstSymbolWithNameAndType(g_gdb_object_getClass, eSymbolTypeCode) != NULL);
}
+AppleObjCRuntimeV2::~AppleObjCRuntimeV2()
+{
+}
+
bool
AppleObjCRuntimeV2::GetDynamicTypeAndAddress (ValueObject &in_value,
DynamicValueType use_dynamic,
@@ -817,9 +820,9 @@ public:
if (process)
{
- std::auto_ptr<objc_class_t> objc_class;
- std::auto_ptr<class_ro_t> class_ro;
- std::auto_ptr<class_rw_t> class_rw;
+ STD_UNIQUE_PTR(objc_class_t) objc_class;
+ STD_UNIQUE_PTR(class_ro_t) class_ro;
+ STD_UNIQUE_PTR(class_rw_t) class_rw;
if (!Read_objc_class(process, objc_class))
return m_name;
@@ -840,7 +843,7 @@ public:
if (!process)
return ObjCLanguageRuntime::ClassDescriptorSP();
- std::auto_ptr<objc_class_t> objc_class;
+ STD_UNIQUE_PTR(objc_class_t) objc_class;
if (!Read_objc_class(process, objc_class))
return ObjCLanguageRuntime::ClassDescriptorSP();
@@ -869,9 +872,9 @@ public:
if (process)
{
- std::auto_ptr<objc_class_t> objc_class;
- std::auto_ptr<class_ro_t> class_ro;
- std::auto_ptr<class_rw_t> class_rw;
+ STD_UNIQUE_PTR(objc_class_t) objc_class;
+ STD_UNIQUE_PTR(class_ro_t) class_ro;
+ STD_UNIQUE_PTR(class_rw_t) class_rw;
if (!Read_objc_class(process, objc_class))
return 0;
@@ -898,9 +901,9 @@ public:
{
lldb_private::Process *process = m_runtime.GetProcess();
- std::auto_ptr<objc_class_t> objc_class;
- std::auto_ptr<class_ro_t> class_ro;
- std::auto_ptr<class_rw_t> class_rw;
+ STD_UNIQUE_PTR(objc_class_t) objc_class;
+ STD_UNIQUE_PTR(class_ro_t) class_ro;
+ STD_UNIQUE_PTR(class_rw_t) class_rw;
if (!Read_objc_class(process, objc_class))
return 0;
@@ -914,7 +917,7 @@ public:
if (instance_method_func)
{
- std::auto_ptr <method_list_t> base_method_list;
+ STD_UNIQUE_PTR(method_list_t) base_method_list;
base_method_list.reset(new method_list_t);
if (!base_method_list->Read(process, class_ro->m_baseMethods_ptr))
@@ -923,7 +926,7 @@ public:
if (base_method_list->m_entsize != method_t::GetSize(process))
return false;
- std::auto_ptr <method_t> method;
+ STD_UNIQUE_PTR(method_t) method;
method.reset(new method_t);
for (uint32_t i = 0, e = base_method_list->m_count; i < e; ++i)
@@ -950,23 +953,20 @@ public:
if (ivar_func)
{
- std::auto_ptr <ivar_list_t> ivar_list;
-
- ivar_list.reset(new ivar_list_t);
- if (!ivar_list->Read(process, class_ro->m_ivars_ptr))
+ ivar_list_t ivar_list;
+ if (!ivar_list.Read(process, class_ro->m_ivars_ptr))
return false;
- if (ivar_list->m_entsize != ivar_t::GetSize(process))
+ if (ivar_list.m_entsize != ivar_t::GetSize(process))
return false;
- std::auto_ptr <ivar_t> ivar;
- ivar.reset(new ivar_t);
+ ivar_t ivar;
- for (uint32_t i = 0, e = ivar_list->m_count; i < e; ++i)
+ for (uint32_t i = 0, e = ivar_list.m_count; i < e; ++i)
{
- ivar->Read(process, ivar_list->m_first_ptr + (i * ivar_list->m_entsize));
+ ivar.Read(process, ivar_list.m_first_ptr + (i * ivar_list.m_entsize));
- if (ivar_func(ivar->m_name.c_str(), ivar->m_type.c_str(), ivar->m_offset_ptr, ivar->m_size))
+ if (ivar_func(ivar.m_name.c_str(), ivar.m_type.c_str(), ivar.m_offset_ptr, ivar.m_size))
break;
}
}
@@ -1354,7 +1354,7 @@ private:
}
};
- bool Read_objc_class (Process* process, std::auto_ptr<objc_class_t> &objc_class)
+ bool Read_objc_class (Process* process, STD_UNIQUE_PTR(objc_class_t) &objc_class)
{
objc_class.reset(new objc_class_t);
@@ -1366,7 +1366,7 @@ private:
return ret;
}
- bool Read_class_row (Process* process, const objc_class_t &objc_class, std::auto_ptr<class_ro_t> &class_ro, std::auto_ptr<class_rw_t> &class_rw)
+ bool Read_class_row (Process* process, const objc_class_t &objc_class, STD_UNIQUE_PTR(class_ro_t) &class_ro, STD_UNIQUE_PTR(class_rw_t) &class_rw)
{
class_ro.reset();
class_rw.reset();
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
index 8e801249d02..07a38fe7d75 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
@@ -29,7 +29,7 @@ class AppleObjCRuntimeV2 :
public AppleObjCRuntime
{
public:
- virtual ~AppleObjCRuntimeV2() { }
+ virtual ~AppleObjCRuntimeV2();
// These are generic runtime functions:
virtual bool
@@ -150,17 +150,17 @@ private:
lldb::addr_t
GetSharedCacheReadOnlyAddress();
- std::auto_ptr<ClangFunction> m_get_class_info_function;
- std::auto_ptr<ClangUtilityFunction> m_get_class_info_code;
+ STD_UNIQUE_PTR(ClangFunction) m_get_class_info_function;
+ STD_UNIQUE_PTR(ClangUtilityFunction) m_get_class_info_code;
lldb::addr_t m_get_class_info_args;
Mutex m_get_class_info_args_mutex;
- std::auto_ptr<ClangFunction> m_get_shared_cache_class_info_function;
- std::auto_ptr<ClangUtilityFunction> m_get_shared_cache_class_info_code;
+ STD_UNIQUE_PTR(ClangFunction) m_get_shared_cache_class_info_function;
+ STD_UNIQUE_PTR(ClangUtilityFunction) m_get_shared_cache_class_info_code;
lldb::addr_t m_get_shared_cache_class_info_args;
Mutex m_get_shared_cache_class_info_args_mutex;
- std::auto_ptr<TypeVendor> m_type_vendor_ap;
+ STD_UNIQUE_PTR(TypeVendor) m_type_vendor_ap;
lldb::addr_t m_isa_hash_table_ptr;
HashTableSignature m_hash_signature;
bool m_has_object_getClass;
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h
index a50651431e7..0ee4d48d30c 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h
@@ -197,14 +197,14 @@ private:
MsgsendMap m_msgSend_map;
lldb::ProcessSP m_process_sp;
lldb::ModuleSP m_objc_module_sp;
- std::auto_ptr<ClangFunction> m_impl_function;
- std::auto_ptr<ClangUtilityFunction> m_impl_code;
+ STD_UNIQUE_PTR(ClangFunction) m_impl_function;
+ STD_UNIQUE_PTR(ClangUtilityFunction) m_impl_code;
Mutex m_impl_function_mutex;
lldb::addr_t m_impl_fn_addr;
lldb::addr_t m_impl_stret_fn_addr;
lldb::addr_t m_msg_forward_addr;
lldb::addr_t m_msg_forward_stret_addr;
- std::auto_ptr<AppleObjCVTables> m_vtables_ap;
+ STD_UNIQUE_PTR(AppleObjCVTables) m_vtables_ap;
};
diff --git a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
index 443eeb96388..5c87ec276f4 100644
--- a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
+++ b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
@@ -296,12 +296,12 @@ ObjectContainerBSDArchive::CreateInstance
lldb::offset_t archive_data_offset = 0;
Archive::shared_ptr archive_sp (Archive::FindCachedArchive (*file, module_sp->GetArchitecture(), module_sp->GetModificationTime()));
- std::auto_ptr<ObjectContainerBSDArchive> container_ap(new ObjectContainerBSDArchive (module_sp,
- archive_data_sp,
- archive_data_offset,
- file,
- file_offset,
- length));
+ STD_UNIQUE_PTR(ObjectContainerBSDArchive) container_ap(new ObjectContainerBSDArchive (module_sp,
+ archive_data_sp,
+ archive_data_offset,
+ file,
+ file_offset,
+ length));
if (container_ap.get())
{
@@ -322,7 +322,7 @@ ObjectContainerBSDArchive::CreateInstance
Archive::shared_ptr archive_sp (Archive::FindCachedArchive (*file, module_sp->GetArchitecture(), module_sp->GetModificationTime()));
if (archive_sp)
{
- std::auto_ptr<ObjectContainerBSDArchive> container_ap(new ObjectContainerBSDArchive (module_sp, data_sp, data_offset, file, file_offset, length));
+ STD_UNIQUE_PTR(ObjectContainerBSDArchive) container_ap(new ObjectContainerBSDArchive (module_sp, data_sp, data_offset, file, file_offset, length));
if (container_ap.get())
{
diff --git a/lldb/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp b/lldb/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp
index ad833ff3c31..fbc64a19b90 100644
--- a/lldb/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp
+++ b/lldb/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp
@@ -67,7 +67,7 @@ ObjectContainerUniversalMachO::CreateInstance
data.SetData (data_sp, data_offset, length);
if (ObjectContainerUniversalMachO::MagicBytesMatch(data))
{
- std::auto_ptr<ObjectContainerUniversalMachO> container_ap(new ObjectContainerUniversalMachO (module_sp, data_sp, data_offset, file, file_offset, length));
+ STD_UNIQUE_PTR(ObjectContainerUniversalMachO) container_ap(new ObjectContainerUniversalMachO (module_sp, data_sp, data_offset, file, file_offset, length));
if (container_ap->ParseHeader())
{
return container_ap.release();
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index 517c8a1b869..cfe9b877d78 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -198,7 +198,7 @@ ObjectFileELF::CreateInstance (const lldb::ModuleSP &module_sp,
unsigned address_size = ELFHeader::AddressSizeInBytes(magic);
if (address_size == 4 || address_size == 8)
{
- std::auto_ptr<ObjectFileELF> objfile_ap(new ObjectFileELF(module_sp, data_sp, data_offset, file, file_offset, length));
+ STD_UNIQUE_PTR(ObjectFileELF) objfile_ap(new ObjectFileELF(module_sp, data_sp, data_offset, file, file_offset, length));
ArchSpec spec;
if (objfile_ap->GetArchitecture(spec) &&
objfile_ap->SetModulesArchitecture(spec))
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
index ba4057c5f3d..0870d90b6bc 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
@@ -155,7 +155,7 @@ private:
/// List of file specifications corresponding to the modules (shared
/// libraries) on which this object file depends.
- mutable std::auto_ptr<lldb_private::FileSpecList> m_filespec_ap;
+ mutable STD_UNIQUE_PTR(lldb_private::FileSpecList) m_filespec_ap;
/// Data extractor holding the string table used to resolve section names.
lldb_private::DataExtractor m_shstr_data;
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index 49441f45ce9..46d63bc8478 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -411,7 +411,7 @@ ObjectFileMachO::CreateInstance (const lldb::ModuleSP &module_sp,
data_sp = file->MemoryMapFileContents(file_offset, length);
data_offset = 0;
}
- std::auto_ptr<ObjectFile> objfile_ap(new ObjectFileMachO (module_sp, data_sp, data_offset, file, file_offset, length));
+ STD_UNIQUE_PTR(ObjectFile) objfile_ap(new ObjectFileMachO (module_sp, data_sp, data_offset, file, file_offset, length));
if (objfile_ap.get() && objfile_ap->ParseHeader())
return objfile_ap.release();
}
@@ -426,7 +426,7 @@ ObjectFileMachO::CreateMemoryInstance (const lldb::ModuleSP &module_sp,
{
if (ObjectFileMachO::MagicBytesMatch(data_sp, 0, data_sp->GetByteSize()))
{
- std::auto_ptr<ObjectFile> objfile_ap(new ObjectFileMachO (module_sp, data_sp, process_sp, header_addr));
+ STD_UNIQUE_PTR(ObjectFile) objfile_ap(new ObjectFileMachO (module_sp, data_sp, process_sp, header_addr));
if (objfile_ap.get() && objfile_ap->ParseHeader())
return objfile_ap.release();
}
diff --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
index 78af6619975..5982874ad27 100644
--- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
+++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
@@ -163,7 +163,7 @@ ObjectFilePECOFF::CreateInstance (const lldb::ModuleSP &module_sp,
// Update the data to contain the entire file if it doesn't already
if (data_sp->GetByteSize() < length)
data_sp = file->MemoryMapFileContents(file_offset, length);
- std::auto_ptr<ObjectFile> objfile_ap(new ObjectFilePECOFF (module_sp, data_sp, data_offset, file, file_offset, length));
+ STD_UNIQUE_PTR(ObjectFile) objfile_ap(new ObjectFilePECOFF (module_sp, data_sp, data_offset, file, file_offset, length));
if (objfile_ap.get() && objfile_ap->ParseHeader())
return objfile_ap.release();
}
diff --git a/lldb/source/Plugins/OperatingSystem/Darwin-Kernel/OperatingSystemDarwinKernel.h b/lldb/source/Plugins/OperatingSystem/Darwin-Kernel/OperatingSystemDarwinKernel.h
index 8427f565933..de781d5d17f 100644
--- a/lldb/source/Plugins/OperatingSystem/Darwin-Kernel/OperatingSystemDarwinKernel.h
+++ b/lldb/source/Plugins/OperatingSystem/Darwin-Kernel/OperatingSystemDarwinKernel.h
@@ -84,7 +84,7 @@ protected:
GetDynamicRegisterInfo ();
lldb::ValueObjectSP m_thread_list_valobj_sp;
- std::auto_ptr<DynamicRegisterInfo> m_register_info_ap;
+ STD_UNIQUE_PTR(DynamicRegisterInfo) m_register_info_ap;
};
diff --git a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
index acacea45549..4127506d6a4 100644
--- a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
+++ b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
@@ -60,7 +60,7 @@ OperatingSystemPython::CreateInstance (Process *process, bool force)
FileSpec python_os_plugin_spec (process->GetPythonOSPluginPath());
if (python_os_plugin_spec && python_os_plugin_spec.Exists())
{
- std::auto_ptr<OperatingSystemPython> os_ap (new OperatingSystemPython (process, python_os_plugin_spec));
+ STD_UNIQUE_PTR(OperatingSystemPython) os_ap (new OperatingSystemPython (process, python_os_plugin_spec));
if (os_ap.get() && os_ap->IsValid())
return os_ap.release();
}
diff --git a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h
index bcc90c686a5..f55cc514f41 100644
--- a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h
+++ b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h
@@ -101,7 +101,7 @@ protected:
GetDynamicRegisterInfo ();
lldb::ValueObjectSP m_thread_list_valobj_sp;
- std::auto_ptr<DynamicRegisterInfo> m_register_info_ap;
+ STD_UNIQUE_PTR(DynamicRegisterInfo) m_register_info_ap;
lldb_private::ScriptInterpreter *m_interpreter;
lldb::ScriptInterpreterObjectSP m_python_object_sp;
diff --git a/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp b/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
index bcc8c77faa4..f80e5e0967e 100644
--- a/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
+++ b/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
@@ -691,7 +691,7 @@ ProcessMonitor::ProcessMonitor(ProcessPOSIX *process,
m_client_fd(-1),
m_server_fd(-1)
{
- std::auto_ptr<LaunchArgs> args;
+ STD_UNIQUE_PTR(LaunchArgs) args;
args.reset(new LaunchArgs(this, module, argv, envp,
stdin_path, stdout_path, stderr_path, working_dir));
@@ -752,7 +752,7 @@ ProcessMonitor::ProcessMonitor(ProcessPOSIX *process,
m_client_fd(-1),
m_server_fd(-1)
{
- std::auto_ptr<AttachArgs> args;
+ STD_UNIQUE_PTR(AttachArgs) args;
args.reset(new AttachArgs(this, pid));
diff --git a/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp b/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp
index 381f4be68df..269a41ef102 100644
--- a/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp
+++ b/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp
@@ -924,7 +924,7 @@ ProcessMonitor::ProcessMonitor(ProcessPOSIX *process,
m_client_fd(-1),
m_server_fd(-1)
{
- std::auto_ptr<LaunchArgs> args;
+ STD_UNIQUE_PTR(LaunchArgs) args;
args.reset(new LaunchArgs(this, module, argv, envp,
stdin_path, stdout_path, stderr_path, working_dir));
@@ -984,7 +984,7 @@ ProcessMonitor::ProcessMonitor(ProcessPOSIX *process,
m_client_fd(-1),
m_server_fd(-1)
{
- std::auto_ptr<AttachArgs> args;
+ STD_UNIQUE_PTR(AttachArgs) args;
args.reset(new AttachArgs(this, pid));
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
index 4a57b433099..4d4e5f4876e 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
@@ -196,7 +196,7 @@ ProcessKDP::DoConnectRemote (Stream *strm, const char *remote_url)
return error;
}
- std::auto_ptr<ConnectionFileDescriptor> conn_ap(new ConnectionFileDescriptor());
+ STD_UNIQUE_PTR(ConnectionFileDescriptor) conn_ap(new ConnectionFileDescriptor());
if (conn_ap.get())
{
// Only try once for now.
diff --git a/lldb/source/Plugins/Process/POSIX/POSIXThread.h b/lldb/source/Plugins/Process/POSIX/POSIXThread.h
index 7aad6719385..d75146e5e17 100644
--- a/lldb/source/Plugins/Process/POSIX/POSIXThread.h
+++ b/lldb/source/Plugins/Process/POSIX/POSIXThread.h
@@ -81,7 +81,7 @@ private:
return (RegisterContextPOSIX *)m_reg_context_sp.get();
}
- std::auto_ptr<lldb_private::StackFrame> m_frame_ap;
+ STD_UNIQUE_PTR(lldb_private::StackFrame) m_frame_ap;
lldb::BreakpointSiteSP m_breakpoint;
lldb::StopInfoSP m_stop_info;
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 00861951116..1d1a0951cbc 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -738,7 +738,7 @@ ProcessGDBRemote::ConnectToDebugserver (const char *connect_url)
{
Error error;
// Sleep and wait a bit for debugserver to start to listen...
- std::auto_ptr<ConnectionFileDescriptor> conn_ap(new ConnectionFileDescriptor());
+ STD_UNIQUE_PTR(ConnectionFileDescriptor) conn_ap(new ConnectionFileDescriptor());
if (conn_ap.get())
{
const uint32_t max_retry_count = 50;
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h
index acbbdf1c2a6..08fe68c2231 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h
@@ -190,7 +190,7 @@ protected:
const DWARFAbbreviationDeclarationSet *m_abbrevs;
void * m_user_data;
DWARFDebugInfoEntry::collection m_die_array; // The compile unit debug information entry item
- std::auto_ptr<DWARFDebugAranges> m_func_aranges_ap; // A table similar to the .debug_aranges table, but this one points to the exact DW_TAG_subprogram DIEs
+ STD_UNIQUE_PTR(DWARFDebugAranges) m_func_aranges_ap; // A table similar to the .debug_aranges table, but this one points to the exact DW_TAG_subprogram DIEs
dw_addr_t m_base_addr;
dw_offset_t m_offset;
uint32_t m_length;
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h
index c716fa423ff..58c295abc24 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h
@@ -77,7 +77,7 @@ protected:
SymbolFileDWARF* m_dwarf2Data;
typedef std::vector<DWARFCompileUnitSP> CompileUnitColl;
CompileUnitColl m_compile_units;
- std::auto_ptr<DWARFDebugAranges> m_cu_aranges_ap; // A quick address to compile unit table
+ STD_UNIQUE_PTR(DWARFDebugAranges) m_cu_aranges_ap; // A quick address to compile unit table
private:
// All parsing needs to be done partially any managed by this class as accessors are called.
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 625f62e775a..778f9e252a7 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -880,7 +880,7 @@ SymbolFileDWARF::ParseCompileUnitFunction (const SymbolContext& sc, DWARFCompile
func_name.SetValue(ConstString(name), false);
FunctionSP func_sp;
- std::auto_ptr<Declaration> decl_ap;
+ STD_UNIQUE_PTR(Declaration) decl_ap;
if (decl_file != 0 || decl_line != 0 || decl_column != 0)
decl_ap.reset(new Declaration (sc.comp_unit->GetSupportFiles().GetFileSpecAtIndex(decl_file),
decl_line,
@@ -995,7 +995,7 @@ SymbolFileDWARF::ParseCompileUnitSupportFiles (const SymbolContext& sc, FileSpec
struct ParseDWARFLineTableCallbackInfo
{
LineTable* line_table;
- std::auto_ptr<LineSequence> sequence_ap;
+ STD_UNIQUE_PTR(LineSequence) sequence_ap;
};
//----------------------------------------------------------------------
@@ -1060,7 +1060,7 @@ SymbolFileDWARF::ParseCompileUnitLineTable (const SymbolContext &sc)
const dw_offset_t cu_line_offset = dwarf_cu_die->GetAttributeValueAsUnsigned(this, dwarf_cu, DW_AT_stmt_list, DW_INVALID_OFFSET);
if (cu_line_offset != DW_INVALID_OFFSET)
{
- std::auto_ptr<LineTable> line_table_ap(new LineTable(sc.comp_unit));
+ STD_UNIQUE_PTR(LineTable) line_table_ap(new LineTable(sc.comp_unit));
if (line_table_ap.get())
{
ParseDWARFLineTableCallbackInfo info;
@@ -1170,12 +1170,12 @@ SymbolFileDWARF::ParseFunctionBlocks
if (tag != DW_TAG_subprogram && (name != NULL || mangled_name != NULL))
{
- std::auto_ptr<Declaration> decl_ap;
+ STD_UNIQUE_PTR(Declaration) decl_ap;
if (decl_file != 0 || decl_line != 0 || decl_column != 0)
decl_ap.reset(new Declaration(sc.comp_unit->GetSupportFiles().GetFileSpecAtIndex(decl_file),
decl_line, decl_column));
- std::auto_ptr<Declaration> call_ap;
+ STD_UNIQUE_PTR(Declaration) call_ap;
if (call_file != 0 || call_line != 0 || call_column != 0)
call_ap.reset(new Declaration(sc.comp_unit->GetSupportFiles().GetFileSpecAtIndex(call_file),
call_line, call_column));
@@ -1435,7 +1435,7 @@ private:
const char *m_property_setter_name;
const char *m_property_getter_name;
uint32_t m_property_attributes;
- std::auto_ptr<ClangASTMetadata> m_metadata_ap;
+ STD_UNIQUE_PTR(ClangASTMetadata) m_metadata_ap;
};
struct BitfieldInfo
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
index b4bbf93a1cd..4fd0ba00d13 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
@@ -13,7 +13,6 @@
// C Includes
// C++ Includes
#include <list>
-#include <memory>
#include <map>
#include <vector>
@@ -567,15 +566,15 @@ protected:
lldb_private::DataExtractor m_data_apple_namespaces;
lldb_private::DataExtractor m_data_apple_objc;
- // The auto_ptr items below are generated on demand if and when someone accesses
+ // The unique pointer items below are generated on demand if and when someone accesses
// them through a non const version of this class.
- std::auto_ptr<DWARFDebugAbbrev> m_abbr;
- std::auto_ptr<DWARFDebugInfo> m_info;
- std::auto_ptr<DWARFDebugLine> m_line;
- std::auto_ptr<DWARFMappedHash::MemoryTable> m_apple_names_ap;
- std::auto_ptr<DWARFMappedHash::MemoryTable> m_apple_types_ap;
- std::auto_ptr<DWARFMappedHash::MemoryTable> m_apple_namespaces_ap;
- std::auto_ptr<DWARFMappedHash::MemoryTable> m_apple_objc_ap;
+ STD_UNIQUE_PTR(DWARFDebugAbbrev) m_abbr;
+ STD_UNIQUE_PTR(DWARFDebugInfo) m_info;
+ STD_UNIQUE_PTR(DWARFDebugLine) m_line;
+ STD_UNIQUE_PTR(DWARFMappedHash::MemoryTable) m_apple_names_ap;
+ STD_UNIQUE_PTR(DWARFMappedHash::MemoryTable) m_apple_types_ap;
+ STD_UNIQUE_PTR(DWARFMappedHash::MemoryTable) m_apple_namespaces_ap;
+ STD_UNIQUE_PTR(DWARFMappedHash::MemoryTable) m_apple_objc_ap;
NameToDIE m_function_basename_index; // All concrete functions
NameToDIE m_function_fullname_index; // All concrete functions
NameToDIE m_function_method_index; // All inlined functions
@@ -589,7 +588,7 @@ protected:
m_using_apple_tables:1;
lldb_private::LazyBool m_supports_DW_AT_APPLE_objc_complete_type;
- std::auto_ptr<DWARFDebugRanges> m_ranges;
+ STD_UNIQUE_PTR(DWARFDebugRanges) m_ranges;
UniqueDWARFASTTypeMap m_unique_ast_type_map;
typedef llvm::SmallPtrSet<const DWARFDebugInfoEntry *, 4> DIEPointerSet;
typedef llvm::DenseMap<const DWARFDebugInfoEntry *, clang::DeclContext *> DIEToDeclContextMap;
diff --git a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
index 55eb7037192..0510b743039 100644
--- a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
+++ b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
@@ -298,7 +298,7 @@ UnwindAssemblyInstEmulation::FirstNonPrologueInsn (AddressRange& func,
UnwindAssembly *
UnwindAssemblyInstEmulation::CreateInstance (const ArchSpec &arch)
{
- std::auto_ptr<EmulateInstruction> inst_emulator_ap (EmulateInstruction::FindPlugin (arch, eInstructionTypePrologueEpilogue, NULL));
+ STD_UNIQUE_PTR(EmulateInstruction) inst_emulator_ap (EmulateInstruction::FindPlugin (arch, eInstructionTypePrologueEpilogue, NULL));
// Make sure that all prologue instructions are handled
if (inst_emulator_ap.get())
return new UnwindAssemblyInstEmulation (arch, inst_emulator_ap.release());
diff --git a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h
index 2afa6bd06cf..deff8b03228 100644
--- a/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h
+++ b/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h
@@ -160,7 +160,7 @@ private:
GetRegisterValue (const lldb_private::RegisterInfo &reg_info,
lldb_private::RegisterValue &reg_value);
- std::auto_ptr<lldb_private::EmulateInstruction> m_inst_emulator_ap;
+ STD_UNIQUE_PTR(lldb_private::EmulateInstruction) m_inst_emulator_ap;
lldb_private::AddressRange* m_range_ptr;
lldb_private::Thread* m_thread_ptr;
lldb_private::UnwindPlan* m_unwind_plan_ptr;
diff --git a/lldb/source/Symbol/FuncUnwinders.cpp b/lldb/source/Symbol/FuncUnwinders.cpp
index 07b2144e528..3de06179ee0 100644
--- a/lldb/source/Symbol/FuncUnwinders.cpp
+++ b/lldb/source/Symbol/FuncUnwinders.cpp
@@ -102,8 +102,8 @@ FuncUnwinders::GetUnwindPlanAtNonCallSite (Thread& thread)
// information. We want to make sure if someone requests an unwind
// plan, that they get one and don't run into a race condition where one
// thread has started to create the unwind plan and has put it into
- // the auto_ptr member variable, and have another thread enter this function
- // and return the partially filled pointer contained in the auto_ptr.
+ // the unique pointer member variable, and have another thread enter this function
+ // and return the partially filled pointer contained in the unique pointer.
// We also want to make sure that we lock out other unwind plans from
// being accessed until this one is done creating itself in case someone
// had some code like:
@@ -128,8 +128,8 @@ FuncUnwinders::GetUnwindPlanFastUnwind (Thread& thread)
// information. We want to make sure if someone requests an unwind
// plan, that they get one and don't run into a race condition where one
// thread has started to create the unwind plan and has put it into
- // the auto_ptr member variable, and have another thread enter this function
- // and return the partially filled pointer contained in the auto_ptr.
+ // the unique pointer member variable, and have another thread enter this function
+ // and return the partially filled pointer contained in the unique pointer.
// We also want to make sure that we lock out other unwind plans from
// being accessed until this one is done creating itself in case someone
// had some code like:
@@ -154,8 +154,8 @@ FuncUnwinders::GetUnwindPlanArchitectureDefault (Thread& thread)
// information. We want to make sure if someone requests an unwind
// plan, that they get one and don't run into a race condition where one
// thread has started to create the unwind plan and has put it into
- // the auto_ptr member variable, and have another thread enter this function
- // and return the partially filled pointer contained in the auto_ptr.
+ // the unique pointer member variable, and have another thread enter this function
+ // and return the partially filled pointer contained in the unique pointer.
// We also want to make sure that we lock out other unwind plans from
// being accessed until this one is done creating itself in case someone
// had some code like:
@@ -190,8 +190,8 @@ FuncUnwinders::GetUnwindPlanArchitectureDefaultAtFunctionEntry (Thread& thread)
// information. We want to make sure if someone requests an unwind
// plan, that they get one and don't run into a race condition where one
// thread has started to create the unwind plan and has put it into
- // the auto_ptr member variable, and have another thread enter this function
- // and return the partially filled pointer contained in the auto_ptr.
+ // the unique pointer member variable, and have another thread enter this function
+ // and return the partially filled pointer contained in the unique pointer.
// We also want to make sure that we lock out other unwind plans from
// being accessed until this one is done creating itself in case someone
// had some code like:
diff --git a/lldb/source/Symbol/LineTable.cpp b/lldb/source/Symbol/LineTable.cpp
index ce9b8598070..98f7e127ca3 100644
--- a/lldb/source/Symbol/LineTable.cpp
+++ b/lldb/source/Symbol/LineTable.cpp
@@ -489,7 +489,7 @@ LineTable::GetContiguousFileAddressRanges (FileAddressRanges &file_ranges, bool
LineTable *
LineTable::LinkLineTable (const FileRangeMap &file_range_map)
{
- std::auto_ptr<LineTable> line_table_ap (new LineTable (m_comp_unit));
+ STD_UNIQUE_PTR(LineTable) line_table_ap (new LineTable (m_comp_unit));
LineSequenceImpl sequence;
const size_t count = m_entries.size();
LineEntry line_entry;
diff --git a/lldb/source/Symbol/ObjectFile.cpp b/lldb/source/Symbol/ObjectFile.cpp
index 1187e7996b3..78c64456231 100644
--- a/lldb/source/Symbol/ObjectFile.cpp
+++ b/lldb/source/Symbol/ObjectFile.cpp
@@ -59,7 +59,7 @@ ObjectFile::FindPlugin (const lldb::ModuleSP &module_sp,
{
for (uint32_t idx = 0; (create_object_container_callback = PluginManager::GetObjectContainerCreateCallbackAtIndex(idx)) != NULL; ++idx)
{
- std::auto_ptr<ObjectContainer> object_container_ap(create_object_container_callback(module_sp, data_sp, data_offset, file, file_offset, file_size));
+ STD_UNIQUE_PTR(ObjectContainer) object_container_ap(create_object_container_callback(module_sp, data_sp, data_offset, file, file_offset, file_size));
if (object_container_ap.get())
object_file_sp = object_container_ap->GetObjectFile(file);
@@ -101,7 +101,7 @@ ObjectFile::FindPlugin (const lldb::ModuleSP &module_sp,
// (like BSD archives caching the contained objects within an file).
for (uint32_t idx = 0; (create_object_container_callback = PluginManager::GetObjectContainerCreateCallbackAtIndex(idx)) != NULL; ++idx)
{
- std::auto_ptr<ObjectContainer> object_container_ap(create_object_container_callback(module_sp, data_sp, data_offset, file, file_offset, file_size));
+ STD_UNIQUE_PTR(ObjectContainer) object_container_ap(create_object_container_callback(module_sp, data_sp, data_offset, file, file_offset, file_size));
if (object_container_ap.get())
object_file_sp = object_container_ap->GetObjectFile(file);
@@ -133,7 +133,7 @@ ObjectFile::FindPlugin (const lldb::ModuleSP &module_sp,
// an object file from the container.
for (uint32_t idx = 0; (create_object_container_callback = PluginManager::GetObjectContainerCreateCallbackAtIndex(idx)) != NULL; ++idx)
{
- std::auto_ptr<ObjectContainer> object_container_ap(create_object_container_callback(module_sp, data_sp, data_offset, file, file_offset, file_size));
+ STD_UNIQUE_PTR(ObjectContainer) object_container_ap(create_object_container_callback(module_sp, data_sp, data_offset, file, file_offset, file_size));
if (object_container_ap.get())
object_file_sp = object_container_ap->GetObjectFile(file);
@@ -392,7 +392,7 @@ ObjectFile::ReadMemory (const ProcessSP &process_sp, lldb::addr_t addr, size_t b
DataBufferSP data_sp;
if (process_sp)
{
- std::auto_ptr<DataBufferHeap> data_ap (new DataBufferHeap (byte_size, 0));
+ STD_UNIQUE_PTR(DataBufferHeap) data_ap (new DataBufferHeap (byte_size, 0));
Error error;
const size_t bytes_read = process_sp->ReadMemory (addr,
data_ap->GetBytes(),
diff --git a/lldb/source/Symbol/SymbolFile.cpp b/lldb/source/Symbol/SymbolFile.cpp
index 808830e1f15..a3d2c0e0773 100644
--- a/lldb/source/Symbol/SymbolFile.cpp
+++ b/lldb/source/Symbol/SymbolFile.cpp
@@ -21,7 +21,7 @@ using namespace lldb_private;
SymbolFile*
SymbolFile::FindPlugin (ObjectFile* obj_file)
{
- std::auto_ptr<SymbolFile> best_symfile_ap;
+ STD_UNIQUE_PTR(SymbolFile) best_symfile_ap;
if (obj_file != NULL)
{
// TODO: Load any plug-ins in the appropriate plug-in search paths and
@@ -32,7 +32,7 @@ SymbolFile::FindPlugin (ObjectFile* obj_file)
SymbolFileCreateInstance create_callback;
for (uint32_t idx = 0; (create_callback = PluginManager::GetSymbolFileCreateCallbackAtIndex(idx)) != NULL; ++idx)
{
- std::auto_ptr<SymbolFile> curr_symfile_ap(create_callback(obj_file));
+ STD_UNIQUE_PTR(SymbolFile) curr_symfile_ap(create_callback(obj_file));
if (curr_symfile_ap.get())
{
@@ -40,7 +40,7 @@ SymbolFile::FindPlugin (ObjectFile* obj_file)
if (sym_file_abilities > best_symfile_abilities)
{
best_symfile_abilities = sym_file_abilities;
- best_symfile_ap = curr_symfile_ap;
+ best_symfile_ap.reset (curr_symfile_ap.release());
// If any symbol file parser has all of the abilities, then
// we should just stop looking.
if ((kAllAbilities & sym_file_abilities) == kAllAbilities)
diff --git a/lldb/source/Symbol/SymbolVendor.cpp b/lldb/source/Symbol/SymbolVendor.cpp
index 343a4b1e8ca..e3a2ca3ebf6 100644
--- a/lldb/source/Symbol/SymbolVendor.cpp
+++ b/lldb/source/Symbol/SymbolVendor.cpp
@@ -34,7 +34,7 @@ using namespace lldb_private;
SymbolVendor*
SymbolVendor::FindPlugin (const lldb::ModuleSP &module_sp, lldb_private::Stream *feedback_strm)
{
- std::auto_ptr<SymbolVendor> instance_ap;
+ STD_UNIQUE_PTR(SymbolVendor) instance_ap;
//----------------------------------------------------------------------
// We currently only have one debug symbol parser...
//----------------------------------------------------------------------
diff --git a/lldb/source/Target/LanguageRuntime.cpp b/lldb/source/Target/LanguageRuntime.cpp
index 7a6bfbe46a8..d3d3fe1f0bd 100644
--- a/lldb/source/Target/LanguageRuntime.cpp
+++ b/lldb/source/Target/LanguageRuntime.cpp
@@ -228,7 +228,7 @@ protected:
LanguageRuntime*
LanguageRuntime::FindPlugin (Process *process, lldb::LanguageType language)
{
- std::auto_ptr<LanguageRuntime> language_runtime_ap;
+ STD_UNIQUE_PTR(LanguageRuntime) language_runtime_ap;
LanguageRuntimeCreateInstance create_callback;
for (uint32_t idx = 0;
diff --git a/lldb/source/Target/Memory.cpp b/lldb/source/Target/Memory.cpp
index ae8d034f77b..f9aaca1e356 100644
--- a/lldb/source/Target/Memory.cpp
+++ b/lldb/source/Target/Memory.cpp
@@ -178,7 +178,7 @@ MemoryCache::Read (addr_t addr,
if (bytes_left > 0)
{
assert ((curr_addr % cache_line_byte_size) == 0);
- std::auto_ptr<DataBufferHeap> data_buffer_heap_ap(new DataBufferHeap (cache_line_byte_size, 0));
+ STD_UNIQUE_PTR(DataBufferHeap) data_buffer_heap_ap(new DataBufferHeap (cache_line_byte_size, 0));
size_t process_bytes_read = m_process.ReadMemoryFromInferior (curr_addr,
data_buffer_heap_ap->GetBytes(),
data_buffer_heap_ap->GetByteSize(),
diff --git a/lldb/source/Target/OperatingSystem.cpp b/lldb/source/Target/OperatingSystem.cpp
index 2c725d3b199..54348856142 100644
--- a/lldb/source/Target/OperatingSystem.cpp
+++ b/lldb/source/Target/OperatingSystem.cpp
@@ -28,7 +28,7 @@ OperatingSystem::FindPlugin (Process *process, const char *plugin_name)
create_callback = PluginManager::GetOperatingSystemCreateCallbackForPluginName (plugin_name);
if (create_callback)
{
- std::auto_ptr<OperatingSystem> instance_ap(create_callback(process, true));
+ STD_UNIQUE_PTR(OperatingSystem) instance_ap(create_callback(process, true));
if (instance_ap.get())
return instance_ap.release();
}
@@ -37,7 +37,7 @@ OperatingSystem::FindPlugin (Process *process, const char *plugin_name)
{
for (uint32_t idx = 0; (create_callback = PluginManager::GetOperatingSystemCreateCallbackAtIndex(idx)) != NULL; ++idx)
{
- std::auto_ptr<OperatingSystem> instance_ap(create_callback(process, false));
+ STD_UNIQUE_PTR(OperatingSystem) instance_ap(create_callback(process, false));
if (instance_ap.get())
return instance_ap.release();
}
diff --git a/lldb/source/Target/Platform.cpp b/lldb/source/Target/Platform.cpp
index bc365603774..e58618e36d4 100644
--- a/lldb/source/Target/Platform.cpp
+++ b/lldb/source/Target/Platform.cpp
@@ -109,7 +109,7 @@ Platform::FindPlugin (Process *process, const char *plugin_name)
{
arch = process->GetTarget().GetArchitecture();
}
- std::auto_ptr<Platform> instance_ap(create_callback(process, &arch));
+ STD_UNIQUE_PTR(Platform) instance_ap(create_callback(process, &arch));
if (instance_ap.get())
return instance_ap.release();
}
@@ -118,7 +118,7 @@ Platform::FindPlugin (Process *process, const char *plugin_name)
{
for (uint32_t idx = 0; (create_callback = PluginManager::GetPlatformCreateCallbackAtIndex(idx)) != NULL; ++idx)
{
- std::auto_ptr<Platform> instance_ap(create_callback(process, false));
+ STD_UNIQUE_PTR(Platform) instance_ap(create_callback(process, false));
if (instance_ap.get())
return instance_ap.release();
}
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index c65ceb1d575..9ab9bc313f7 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -4440,7 +4440,7 @@ Process::SetSTDIOFileDescriptor (int file_descriptor)
{
// First set up the Read Thread for reading/handling process I/O
- std::auto_ptr<ConnectionFileDescriptor> conn_ap (new ConnectionFileDescriptor (file_descriptor, true));
+ STD_UNIQUE_PTR(ConnectionFileDescriptor) conn_ap (new ConnectionFileDescriptor (file_descriptor, true));
if (conn_ap.get())
{
diff --git a/lldb/source/Target/StackFrameList.cpp b/lldb/source/Target/StackFrameList.cpp
index dad67dc51d8..41f57658e63 100644
--- a/lldb/source/Target/StackFrameList.cpp
+++ b/lldb/source/Target/StackFrameList.cpp
@@ -717,7 +717,7 @@ StackFrameList::InvalidateFrames (uint32_t start_idx)
}
void
-StackFrameList::Merge (std::auto_ptr<StackFrameList>& curr_ap, lldb::StackFrameListSP& prev_sp)
+StackFrameList::Merge (STD_UNIQUE_PTR(StackFrameList)& curr_ap, lldb::StackFrameListSP& prev_sp)
{
Mutex::Locker curr_locker (curr_ap.get() ? &curr_ap->m_mutex : NULL);
Mutex::Locker prev_locker (prev_sp.get() ? &prev_sp->m_mutex : NULL);
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index ea97fd7d641..8d3e19e7d28 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -76,9 +76,9 @@ Target::Target(Debugger &debugger, const ArchSpec &target_arch, const lldb::Plat
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 @@ Target::StopHook::StopHook (lldb::TargetSP target_sp, lldb::user_id_t uid) :
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 @@ Target::StopHook::StopHook (const StopHook &rhs) :
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)
diff --git a/lldb/source/Target/UnwindAssembly.cpp b/lldb/source/Target/UnwindAssembly.cpp
index af662b97c74..4901f6d91ae 100644
--- a/lldb/source/Target/UnwindAssembly.cpp
+++ b/lldb/source/Target/UnwindAssembly.cpp
@@ -24,7 +24,7 @@ UnwindAssembly::FindPlugin (const ArchSpec &arch)
(create_callback = PluginManager::GetUnwindAssemblyCreateCallbackAtIndex(idx)) != NULL;
++idx)
{
- std::auto_ptr<UnwindAssembly> assembly_profiler_ap (create_callback (arch));
+ STD_UNIQUE_PTR(UnwindAssembly) assembly_profiler_ap (create_callback (arch));
if (assembly_profiler_ap.get ())
return assembly_profiler_ap.release ();
}
OpenPOWER on IntegriCloud