summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2019-08-26 08:22:52 +0000
committerRaphael Isemann <teemperor@gmail.com>2019-08-26 08:22:52 +0000
commit72ca5f36944ee01566ca1a42083e52315ea4264a (patch)
tree1671b1bf8e701ca88004d4941f4283f7dab68b1b /lldb/source/Commands
parent8e5184af71124be3ed7f53f4a25d5ea7742aa3c2 (diff)
downloadbcm5719-llvm-72ca5f36944ee01566ca1a42083e52315ea4264a.tar.gz
bcm5719-llvm-72ca5f36944ee01566ca1a42083e52315ea4264a.zip
[lldb][NFC] Add ProcessInfo::GetNameAsStringRef to simplify some code
llvm-svn: 369880
Diffstat (limited to 'lldb/source/Commands')
-rw-r--r--lldb/source/Commands/CommandObjectPlatform.cpp4
-rw-r--r--lldb/source/Commands/CommandObjectProcess.cpp4
2 files changed, 2 insertions, 6 deletions
diff --git a/lldb/source/Commands/CommandObjectPlatform.cpp b/lldb/source/Commands/CommandObjectPlatform.cpp
index 43a06310738..0bd12d18283 100644
--- a/lldb/source/Commands/CommandObjectPlatform.cpp
+++ b/lldb/source/Commands/CommandObjectPlatform.cpp
@@ -1467,9 +1467,7 @@ public:
return;
for (uint32_t i = 0; i < num_matches; ++i) {
- request.AddCompletion(
- llvm::StringRef(process_infos.GetProcessNameAtIndex(i),
- process_infos.GetProcessNameLengthAtIndex(i)));
+ request.AddCompletion(process_infos.GetProcessNameAtIndex(i));
}
return;
}
diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp
index f4788666d47..e934b7cc559 100644
--- a/lldb/source/Commands/CommandObjectProcess.cpp
+++ b/lldb/source/Commands/CommandObjectProcess.cpp
@@ -353,9 +353,7 @@ public:
if (num_matches == 0)
return;
for (size_t i = 0; i < num_matches; ++i) {
- request.AddCompletion(
- llvm::StringRef(process_infos.GetProcessNameAtIndex(i),
- process_infos.GetProcessNameLengthAtIndex(i)));
+ request.AddCompletion(process_infos.GetProcessNameAtIndex(i));
}
}
OpenPOWER on IntegriCloud