summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-11-17 21:15:14 +0000
committerZachary Turner <zturner@google.com>2016-11-17 21:15:14 +0000
commit3165945a419e4882b94f73f005f9ea4d3d10a985 (patch)
treef8ecba9330545a9f0fa01053d2d237c46d85319f /lldb/source/Target
parentca9d83475e94b3b1649f6f76b4cd6c345ea0404b (diff)
downloadbcm5719-llvm-3165945a419e4882b94f73f005f9ea4d3d10a985.tar.gz
bcm5719-llvm-3165945a419e4882b94f73f005f9ea4d3d10a985.zip
Convert Platform, Process, and Connection functions to StringRef.
All tests pass on Linux and Windows. llvm-svn: 287259
Diffstat (limited to 'lldb/source/Target')
-rw-r--r--lldb/source/Target/Platform.cpp4
-rw-r--r--lldb/source/Target/Process.cpp10
-rw-r--r--lldb/source/Target/Target.cpp2
3 files changed, 8 insertions, 8 deletions
diff --git a/lldb/source/Target/Platform.cpp b/lldb/source/Target/Platform.cpp
index 270400a0e7b..d25c3b25adf 100644
--- a/lldb/source/Target/Platform.cpp
+++ b/lldb/source/Target/Platform.cpp
@@ -1758,8 +1758,8 @@ Error Platform::UnloadImage(lldb_private::Process *process,
return Error("UnloadImage is not supported on the current platform");
}
-lldb::ProcessSP Platform::ConnectProcess(const char *connect_url,
- const char *plugin_name,
+lldb::ProcessSP Platform::ConnectProcess(llvm::StringRef connect_url,
+ llvm::StringRef plugin_name,
lldb_private::Debugger &debugger,
lldb_private::Target *target,
lldb_private::Error &error) {
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index 2a61763fe18..f5a5d47b5ea 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -662,14 +662,15 @@ void ProcessInstanceInfoMatch::Clear() {
m_match_all_users = false;
}
-ProcessSP Process::FindPlugin(lldb::TargetSP target_sp, const char *plugin_name,
+ProcessSP Process::FindPlugin(lldb::TargetSP target_sp,
+ llvm::StringRef plugin_name,
ListenerSP listener_sp,
const FileSpec *crash_file_path) {
static uint32_t g_process_unique_id = 0;
ProcessSP process_sp;
ProcessCreateInstance create_callback = nullptr;
- if (plugin_name) {
+ if (!plugin_name.empty()) {
ConstString const_plugin_name(plugin_name);
create_callback =
PluginManager::GetProcessCreateCallbackForPluginName(const_plugin_name);
@@ -3245,13 +3246,12 @@ void Process::CompleteAttach() {
m_stop_info_override_callback = process_arch.GetStopInfoOverrideCallback();
}
-Error Process::ConnectRemote(Stream *strm, const char *remote_url) {
+Error Process::ConnectRemote(Stream *strm, llvm::StringRef remote_url) {
m_abi_sp.reset();
m_process_input_reader.reset();
// Find the process and its architecture. Make sure it matches the
- // architecture
- // of the current Target, and if not adjust it.
+ // architecture of the current Target, and if not adjust it.
Error error(DoConnectRemote(strm, remote_url));
if (error.Success()) {
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index fb43c407af0..e517d6c35a4 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -170,7 +170,7 @@ void Target::DeleteCurrentProcess() {
}
const lldb::ProcessSP &Target::CreateProcess(ListenerSP listener_sp,
- const char *plugin_name,
+ llvm::StringRef plugin_name,
const FileSpec *crash_file) {
DeleteCurrentProcess();
m_process_sp = Process::FindPlugin(shared_from_this(), plugin_name,
OpenPOWER on IntegriCloud