[llvm-branch-commits] [clang] 0cbd451 - Revert "[clang-cl] Add new option `/pathmap:<from>=<to>` to replace the path …"
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Jun 5 17:53:19 PDT 2026
Author: Vladimir Vereschaka
Date: 2026-06-05T17:53:16-07:00
New Revision: 0cbd4511bd28f842200dab84742f716d83dd3bbc
URL: https://github.com/llvm/llvm-project/commit/0cbd4511bd28f842200dab84742f716d83dd3bbc
DIFF: https://github.com/llvm/llvm-project/commit/0cbd4511bd28f842200dab84742f716d83dd3bbc.diff
LOG: Revert "[clang-cl] Add new option `/pathmap:<from>=<to>` to replace the path …"
This reverts commit 832f4c41ae172950bbb5797803d6ec1a94edd146.
Added:
Modified:
clang/docs/ReleaseNotes.rst
clang/include/clang/Options/Options.td
Removed:
clang/test/CodeGenCXX/cl-pathmap.cpp
clang/test/Driver/cl-pathmap.c
clang/test/Preprocessor/cl-pathmap.c
################################################################################
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 4887c1e4cfc65..cf4826f50e5a5 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -362,17 +362,6 @@ New Compiler Flags
be aligned to 4-byte alignment rather than fully unaligned or fully (8-byte)
aligned.
-- New ``-cl`` option ``/pathmap:`` added to match MSVC. This option acts as a
- clang's ``-ffile-prefix-map=value`` and has known
diff erences in behaviour
- with the CL's option that do not affect the functionality: nomalizes the
- macro prefix map pathes -- removes `./` and uses the target's platform-
- specific path separator character when expanding the preprocessor macros --
- ``-ffile-reproducible`` (but not the debug and coverage prefix maps);
- does not require ``/experimental:deterministic`` as by MSVC. It needed for
- removing a hostname from a mangling hash gen, but clang-cl does not use
- a hostname when generates the hashes. Known issues -- does not remap the
- source file pathes within PCH/PCM files.
-
Deprecated Compiler Flags
-------------------------
diff --git a/clang/include/clang/Options/Options.td b/clang/include/clang/Options/Options.td
index dd15b05430bfb..4fd892e58df86 100644
--- a/clang/include/clang/Options/Options.td
+++ b/clang/include/clang/Options/Options.td
@@ -9318,8 +9318,6 @@ def _SLASH_QIntel_jcc_erratum : CLFlag<"QIntel-jcc-erratum">,
Alias<mbranches_within_32B_boundaries>;
def _SLASH_arm64EC : CLFlag<"arm64EC">,
HelpText<"Set build target to arm64ec">;
-def _SLASH_pathmap : CLCompileJoined<"pathmap:">,
- Alias<ffile_prefix_map_EQ>;
def : CLFlag<"Qgather-">, Alias<mno_gather>,
HelpText<"Disable generation of gather instructions in auto-vectorization(x86 only)">;
def : CLFlag<"Qscatter-">, Alias<mno_scatter>,
diff --git a/clang/test/CodeGenCXX/cl-pathmap.cpp b/clang/test/CodeGenCXX/cl-pathmap.cpp
deleted file mode 100644
index e7b954ba049b3..0000000000000
--- a/clang/test/CodeGenCXX/cl-pathmap.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-// RUN: %clang_cl /clang:-emit-llvm /pathmap:%p=x:/path-to/ -clang:-S -clang:-o- -- %s 2>&1 | FileCheck %s --check-prefix=CHECK-PREFIX-MAP
-
-// CHECK-PREFIX-MAP: c"x:\\path-to\\cl-pathmap.cpp\00"
-
-namespace std {
-class source_location {
-public:
-struct __impl {
- const char *_M_file_name;
- const char *_M_function_name;
- unsigned _M_line;
- unsigned _M_column;
-};
-};
-} // namespace std
-
-const std::source_location::__impl *__m_impl = static_cast<const std::source_location::__impl *>(__builtin_source_location());
-const char* file = __m_impl->_M_file_name;
diff --git a/clang/test/Driver/cl-pathmap.c b/clang/test/Driver/cl-pathmap.c
deleted file mode 100644
index 3c7c9f667c1f6..0000000000000
--- a/clang/test/Driver/cl-pathmap.c
+++ /dev/null
@@ -1,4 +0,0 @@
-// RUN: %clang_cl -E -### /pathmap:%p=. %s 2>&1 | FileCheck %s --check-prefix CHECK-CC1-OPTS
-// CHECK-CC1-OPTS: -fdebug-prefix-map=
-// CHECK-CC1-OPTS: -fmacro-prefix-map=
-// CHECK-CC1-OPTS: -fcoverage-prefix-map=
diff --git a/clang/test/Preprocessor/cl-pathmap.c b/clang/test/Preprocessor/cl-pathmap.c
deleted file mode 100644
index dbabd5ae5075f..0000000000000
--- a/clang/test/Preprocessor/cl-pathmap.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// RUN: %clang_cl -E /pathmap:%p=x:/path-to/ %s | FileCheck %s --check-prefix CHECK-REPRODUCABLE
-// CHECK-REPRODUCABLE: filename: "x:\\path-to\\cl-pathmap.c"
-// CHECK-REPRODUCABLE-NOT: filename:
-
-//NOTE: currently . and .\ just gets eliminated after mapping
-// RUN: %clang_cl -E /pathmap:%p=. %s | FileCheck %s --check-prefix CHECK-SIMPLE
-// CHECK-SIMPLE: filename: "cl-pathmap.c"
-// CHECK-SIMPLE-NOT: filename:
-filename: __FILE__
More information about the llvm-branch-commits
mailing list