[all-commits] [llvm/llvm-project] e4ae0a: [Support/Path] sys::path::replace_path_prefix fix ...

sylvain-audi via All-commits all-commits at lists.llvm.org
Fri Apr 3 10:50:42 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e4ae0a2e975137a2596df06158317fcb2d21b86d
      https://github.com/llvm/llvm-project/commit/e4ae0a2e975137a2596df06158317fcb2d21b86d
  Author: Sylvain Audi <sylvain.audi at ubisoft.com>
  Date:   2020-04-03 (Fri, 03 Apr 2020)

  Changed paths:
    M llvm/include/llvm/Support/Path.h
    M llvm/lib/Support/Path.cpp
    M llvm/unittests/Support/Path.cpp

  Log Message:
  -----------
  [Support/Path] sys::path::replace_path_prefix fix and simplifications

Added unit tests for 2 scenarios that were failing.
Made replace_path_prefix back to 3 parameters instead of 5, simplifying the implementation. The other 2 were always used with the default value.

This commit is intended to be the first of 3:
1) simplify/fix replace_path_prefix.
2) use it in the context of -fdebug-prefix-map and -fmacro-prefix-map (see D76869).
3) Make Windows version of replace_path_prefix insensitive to both case and separators (slash vs backslash).

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




More information about the All-commits mailing list