https://github.com/vvereschaka created 
https://github.com/llvm/llvm-project/pull/201981

Reverts llvm/llvm-project#198664

Causes test failures on 
[llvm-clang-aarch64-darwin](https://lab.llvm.org/buildbot/#/builders/190) bot.

>From 0cbd4511bd28f842200dab84742f716d83dd3bbc Mon Sep 17 00:00:00 2001
From: Vladimir Vereschaka <[email protected]>
Date: Fri, 5 Jun 2026 17:53:16 -0700
Subject: [PATCH] =?UTF-8?q?Revert=20"[clang-cl]=20Add=20new=20option=20`/p?=
 =?UTF-8?q?athmap:<from>=3D<to>`=20to=20replace=20the=20path=20=E2=80=A6"?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This reverts commit 832f4c41ae172950bbb5797803d6ec1a94edd146.
---
 clang/docs/ReleaseNotes.rst            | 11 -----------
 clang/include/clang/Options/Options.td |  2 --
 clang/test/CodeGenCXX/cl-pathmap.cpp   | 18 ------------------
 clang/test/Driver/cl-pathmap.c         |  4 ----
 clang/test/Preprocessor/cl-pathmap.c   |  9 ---------
 5 files changed, 44 deletions(-)
 delete mode 100644 clang/test/CodeGenCXX/cl-pathmap.cpp
 delete mode 100644 clang/test/Driver/cl-pathmap.c
 delete mode 100644 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 differences 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__

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to