[all-commits] [llvm/llvm-project] 990236: Support: Use sys::path::is_style_{posix, windows}()...

Duncan P. N. Exon Smith via All-commits all-commits at lists.llvm.org
Fri Oct 29 12:09:56 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 99023627010bbfefb71e25a2b4d056de1cbd354e
      https://github.com/llvm/llvm-project/commit/99023627010bbfefb71e25a2b4d056de1cbd354e
  Author: Duncan P. N. Exon Smith <dexonsmith at apple.com>
  Date:   2021-10-29 (Fri, 29 Oct 2021)

  Changed paths:
    M clang/include/clang/Basic/JsonSupport.h
    M clang/lib/Basic/FileManager.cpp
    M clang/lib/Driver/Driver.cpp
    M clang/lib/Driver/ToolChain.cpp
    M clang/lib/Lex/PPDirectives.cpp
    M clang/unittests/Basic/FileManagerTest.cpp
    M clang/unittests/Driver/ToolChainTest.cpp
    M clang/unittests/Lex/HeaderSearchTest.cpp
    M clang/unittests/Tooling/RefactoringTest.cpp
    M llvm/include/llvm/Support/VirtualFileSystem.h
    M llvm/lib/Support/GraphWriter.cpp
    M llvm/lib/Support/Path.cpp
    M llvm/tools/lli/lli.cpp

  Log Message:
  -----------
  Support: Use sys::path::is_style_{posix,windows}() in a few places

Use the new sys::path::is_style_posix() and is_style_windows() in a few
places that need to detect the system's native path style.

In llvm/lib/Support/Path.cpp, this patch removes most uses of the
private `real_style()`, where is_style_posix() and is_style_windows()
are just a little tidier.

Elsewhere, this removes `_WIN32` macro checks. Added a FIXME to a
FileManagerTest that seemed fishy, but maintained the existing
behaviour.

Differential Revision: https://reviews.llvm.org/D112289




More information about the All-commits mailing list