aboutsummaryrefslogtreecommitdiff
path: root/source/Commands/CommandObjectPlatform.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Commands/CommandObjectPlatform.cpp')
-rw-r--r--source/Commands/CommandObjectPlatform.cpp33
1 files changed, 17 insertions, 16 deletions
diff --git a/source/Commands/CommandObjectPlatform.cpp b/source/Commands/CommandObjectPlatform.cpp
index 562572b4c75e..62ea683e6e0d 100644
--- a/source/Commands/CommandObjectPlatform.cpp
+++ b/source/Commands/CommandObjectPlatform.cpp
@@ -13,10 +13,10 @@
// Other libraries and framework includes
// Project includes
#include "CommandObjectPlatform.h"
-#include "lldb/Core/DataExtractor.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/PluginManager.h"
+#include "lldb/Host/OptionParser.h"
#include "lldb/Host/StringConvert.h"
#include "lldb/Interpreter/Args.h"
#include "lldb/Interpreter/CommandInterpreter.h"
@@ -27,9 +27,10 @@
#include "lldb/Target/ExecutionContext.h"
#include "lldb/Target/Platform.h"
#include "lldb/Target/Process.h"
-#include "lldb/Utility/Utils.h"
+#include "lldb/Utility/DataExtractor.h"
#include "llvm/ADT/SmallString.h"
+#include "llvm/Support/Threading.h"
using namespace lldb;
using namespace lldb_private;
@@ -1182,21 +1183,21 @@ protected:
m_options.match_info.GetProcessInfo().GetName();
if (match_name && match_name[0]) {
switch (m_options.match_info.GetNameMatchType()) {
- case eNameMatchIgnore:
+ case NameMatch::Ignore:
break;
- case eNameMatchEquals:
+ case NameMatch::Equals:
match_desc = "matched";
break;
- case eNameMatchContains:
+ case NameMatch::Contains:
match_desc = "contained";
break;
- case eNameMatchStartsWith:
+ case NameMatch::StartsWith:
match_desc = "started with";
break;
- case eNameMatchEndsWith:
+ case NameMatch::EndsWith:
match_desc = "ended with";
break;
- case eNameMatchRegularExpression:
+ case NameMatch::RegularExpression:
match_desc = "matched the regular expression";
break;
}
@@ -1249,8 +1250,8 @@ protected:
public:
CommandOptions()
: Options(), match_info(), show_args(false), verbose(false) {
- static std::once_flag g_once_flag;
- std::call_once(g_once_flag, []() {
+ static llvm::once_flag g_once_flag;
+ llvm::call_once(g_once_flag, []() {
PosixPlatformCommandOptionValidator *posix_validator =
new PosixPlatformCommandOptionValidator();
for (auto &Option : g_platform_process_list_options) {
@@ -1342,31 +1343,31 @@ protected:
case 'n':
match_info.GetProcessInfo().GetExecutableFile().SetFile(option_arg,
false);
- match_info.SetNameMatchType(eNameMatchEquals);
+ match_info.SetNameMatchType(NameMatch::Equals);
break;
case 'e':
match_info.GetProcessInfo().GetExecutableFile().SetFile(option_arg,
false);
- match_info.SetNameMatchType(eNameMatchEndsWith);
+ match_info.SetNameMatchType(NameMatch::EndsWith);
break;
case 's':
match_info.GetProcessInfo().GetExecutableFile().SetFile(option_arg,
false);
- match_info.SetNameMatchType(eNameMatchStartsWith);
+ match_info.SetNameMatchType(NameMatch::StartsWith);
break;
case 'c':
match_info.GetProcessInfo().GetExecutableFile().SetFile(option_arg,
false);
- match_info.SetNameMatchType(eNameMatchContains);
+ match_info.SetNameMatchType(NameMatch::Contains);
break;
case 'r':
match_info.GetProcessInfo().GetExecutableFile().SetFile(option_arg,
false);
- match_info.SetNameMatchType(eNameMatchRegularExpression);
+ match_info.SetNameMatchType(NameMatch::RegularExpression);
break;
case 'A':
@@ -1585,7 +1586,7 @@ public:
if (partial_name) {
match_info.GetProcessInfo().GetExecutableFile().SetFile(
partial_name, false);
- match_info.SetNameMatchType(eNameMatchStartsWith);
+ match_info.SetNameMatchType(NameMatch::StartsWith);
}
platform_sp->FindProcesses(match_info, process_infos);
const uint32_t num_matches = process_infos.GetSize();