[clang] [clang-cl] Add new option `/pathmap:<from>=<to>` to replace the path prefix <from> with <to>. (PR #198664)

Vladimir Vereschaka via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 5 13:49:24 PDT 2026


================
@@ -0,0 +1,19 @@
+// RUN: %clang_cl /clang:-emit-llvm /pathmap:%p=x:/path-to/ /Fo:%t.bc /c %s
+// RUN: llvm-dis %t.bc -o - | FileCheck %s --check-prefix=CHECK-PREFIX-MAP 
----------------
vvereschaka wrote:

Unfortunately, `clang-cl` does not forward IR output to the console in a proper way, when `lit` can catch and process it. I.e `/Fo:-` creates a file with a `-` name, `/Fo:con` dumps to console, but `lit` does not see it, '-o -' is an unsupported option for `clang-cl`.

https://github.com/llvm/llvm-project/pull/198664


More information about the cfe-commits mailing list