[llvm] Normalize file path to fix problems with different folder separators. (PR #215225)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 14 02:04:36 PDT 2026


================
@@ -67,7 +67,9 @@ attributes #1 = { nounwind readnone }
 !23 = !DILocation(line: 8, column: 3, scope: !14)
 ; LINES: <main>:
 ; LINES-NEXT: main():
-; LINES-NEXT: SRC_COMPDIR/source-interleave-hexagon.c:6
+;; Source paths are normalized to the host separator, which is '/' on POSIX and
+;; '\' on Windows, so match either.
+; LINES-NEXT: Inputs{{[/\\]}}source-interleave-hexagon.c:6
----------------
jh7370 wrote:

I'm not a fan of testing like this. It means you don't actually know that the right separator is actually used for the host. (It's unlikely, but it would even permit `\` appearing on Linux).

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


More information about the llvm-commits mailing list