[Lldb-commits] [lldb] [lldb] Fix module name tab completion (PR #93458)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Tue May 28 10:03:41 PDT 2024


================
@@ -297,8 +312,9 @@ class ModuleCompleter : public Completer {
   void DoCompletion(SearchFilter *filter) override { filter->Search(*this); }
 
 private:
-  const char *m_file_name;
-  const char *m_dir_name;
+  std::optional<llvm::StringRef> m_file_name;
----------------
labath wrote:

Yeah, this was my mistake. I originally wrote this using `"/"` as the invalid file name (thinking `/` cannot appear in a file name), but then I changed it because: a) I though it was too clever; b) I realized that if `"/"` is the whole path, then `/` *is* the file name.  And then I only updated half of the code...

https://github.com/llvm/llvm-project/pull/93458


More information about the lldb-commits mailing list