[Lldb-commits] [PATCH] D113255: [lldb] Use is_style_posix() for path style checks

Martin Storsjö via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Nov 5 12:51:50 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rGa2c9cf4c7697: [lldb] Use is_style_posix() for path style checks (authored by mstorsjo).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113255/new/

https://reviews.llvm.org/D113255

Files:
  lldb/include/lldb/Utility/FileSpec.h
  lldb/source/Utility/FileSpec.cpp


Index: lldb/source/Utility/FileSpec.cpp
===================================================================
--- lldb/source/Utility/FileSpec.cpp
+++ lldb/source/Utility/FileSpec.cpp
@@ -43,9 +43,7 @@
 }
 
 bool PathStyleIsPosix(FileSpec::Style style) {
-  return (style == FileSpec::Style::posix ||
-          (style == FileSpec::Style::native &&
-           GetNativeStyle() == FileSpec::Style::posix));
+  return llvm::sys::path::is_style_posix(style);
 }
 
 const char *GetPathSeparators(FileSpec::Style style) {
Index: lldb/include/lldb/Utility/FileSpec.h
===================================================================
--- lldb/include/lldb/Utility/FileSpec.h
+++ lldb/include/lldb/Utility/FileSpec.h
@@ -202,7 +202,7 @@
   /// \return
   ///     \b true if the file path is case sensitive (POSIX), false
   ///		if case insensitive (Windows).
-  bool IsCaseSensitive() const { return m_style != Style::windows; }
+  bool IsCaseSensitive() const { return is_style_posix(m_style); }
 
   /// Dump this object to a Stream.
   ///


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113255.385165.patch
Type: text/x-patch
Size: 1037 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20211105/87037af4/attachment.bin>


More information about the lldb-commits mailing list