[Lldb-commits] [PATCH] D57895: Breakpad: auto-detect path style of file entries

Adrian McCarthy via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 7 14:52:54 PST 2019

amccarth added inline comments.

Comment at: include/lldb/Utility/FileSpec.h:250
+  /// unreliable (e.g. "c:\foo.txt" is a valid relative posix path).
+  static llvm::Optional<Style> GuessPathStyle(llvm::StringRef path);
Given that this implementation is limited to absolute paths ... should it be in such a general purpose class?  

If so, maybe this restriction be made more obvious by naming the parameter `absolute_path`.  Then people who just look at the signature without reading the comments, or who get a prompt in their IDE are more likely to note the limitation.

Comment at: source/Utility/FileSpec.cpp:375
+    return Style::windows;
+  return llvm::None;
The code this replaces was returning `Style::native` rather than `Style::None`.  I'm not sure if that will have any implications.



More information about the lldb-commits mailing list