[Lldb-commits] [PATCH] D149472: [lldb] Refactor host::OpenFileInExternalEditor
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Apr 28 11:11:37 PDT 2023
JDevlieghere marked 5 inline comments as done.
JDevlieghere added inline comments.
================
Comment at: lldb/source/Host/macosx/objcxx/Host.mm:335
+
+ const std::string file_path = file_spec.GetPath();
+
----------------
mib wrote:
> I guess this doesn't need to be a `const std::string`, a `llvm::StringRef` would have been nice but looking at `SBFileSpec::GetPath`, there is unfortunately no overload for that.
Given how FileSpecs stores path components, you basically always need an owning string.
================
Comment at: lldb/source/Host/macosx/objcxx/Host.mm:385
- static std::string g_app_name;
- static FSRef g_app_fsref;
+ static std::optional<FSRef> g_app_fsref;
+ static std::once_flag g_once_flag;
----------------
mib wrote:
> why is this static ?
Because it is cached across calls.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149472/new/
https://reviews.llvm.org/D149472
More information about the lldb-commits
mailing list