diff options
author | Pavel Labath <pavel@labath.sk> | 2022-02-07 16:21:57 +0100 |
---|---|---|
committer | Pavel Labath <pavel@labath.sk> | 2022-03-02 14:57:01 +0100 |
commit | d2edca6276d1715a02d1144eae577b3d79673d67 (patch) | |
tree | 3b7f7a41ea5e6a3aa51b6583830141bb1965c7be /lldb/source/Commands/CommandObjectPlatform.cpp | |
parent | ea998709ebbb2c0fa4e0e04cc917d0a4f9959d06 (diff) | |
download | llvm-d2edca6276d1715a02d1144eae577b3d79673d67.zip llvm-d2edca6276d1715a02d1144eae577b3d79673d67.tar.gz llvm-d2edca6276d1715a02d1144eae577b3d79673d67.tar.bz2 |
[lldb/Platform] Prepare decouple instance and plugin names
This patch changes the return value of Platform::GetName() to a
StringRef, and uses the opportunity (compile errors) to change some
callsites to use GetPluginName() instead. The two methods still remain
hardwired to return the same thing, but this will change once the ideas
in
<https://discourse.llvm.org/t/multiple-platforms-with-the-same-name/59594>
are implemented.
Differential Revision: https://reviews.llvm.org/D119146
Diffstat (limited to 'lldb/source/Commands/CommandObjectPlatform.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectPlatform.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lldb/source/Commands/CommandObjectPlatform.cpp b/lldb/source/Commands/CommandObjectPlatform.cpp index 4c18465..bf586ad 100644 --- a/lldb/source/Commands/CommandObjectPlatform.cpp +++ b/lldb/source/Commands/CommandObjectPlatform.cpp @@ -1281,16 +1281,15 @@ protected: result.AppendErrorWithFormatv( "no processes were found that {0} \"{1}\" on the \"{2}\" " "platform\n", - match_desc, match_name, platform_sp->GetPluginName()); + match_desc, match_name, platform_sp->GetName()); else result.AppendErrorWithFormatv( "no processes were found on the \"{0}\" platform\n", - platform_sp->GetPluginName()); + platform_sp->GetName()); } else { - result.AppendMessageWithFormat( - "%u matching process%s found on \"%s\"", matches, - matches > 1 ? "es were" : " was", - platform_sp->GetName().GetCString()); + result.AppendMessageWithFormatv( + "{0} matching process{1} found on \"{2}\"", matches, + matches > 1 ? "es were" : " was", platform_sp->GetName()); if (match_desc) result.AppendMessageWithFormat(" whose name %s \"%s\"", match_desc, match_name); |