summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-04-18 18:10:51 +0000
committerGreg Clayton <gclayton@apple.com>2013-04-18 18:10:51 +0000
commite01e07b6e76ad6f571cefe679d112fede88cf1db (patch)
tree20979ebc3dfe96a71174222e2fee18f30f772abf /lldb/source/Plugins/Process
parent56f976f6bda043e5bdbd35e5d92968a112b74a10 (diff)
downloadbcm5719-llvm-e01e07b6e76ad6f571cefe679d112fede88cf1db.tar.gz
bcm5719-llvm-e01e07b6e76ad6f571cefe679d112fede88cf1db.zip
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. llvm-svn: 179779
Diffstat (limited to 'lldb/source/Plugins/Process')
-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
5 files changed, 7 insertions, 7 deletions
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;
OpenPOWER on IntegriCloud