diff --git a/lldb/include/lldb/Utility/FileSpec.h b/lldb/include/lldb/Utility/FileSpec.h --- a/lldb/include/lldb/Utility/FileSpec.h +++ b/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. /// diff --git a/lldb/source/Utility/FileSpec.cpp b/lldb/source/Utility/FileSpec.cpp --- a/lldb/source/Utility/FileSpec.cpp +++ b/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) {