[PATCH] D109057: [openmp] Accept directory for libomptarget-bc-path

Michael Kruse via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 8 10:24:31 PDT 2021


Meinersbur added inline comments.


================
Comment at: clang/test/Driver/openmp-offload-gpu.c:178
 // CHK-BCLIB-USER: clang{{.*}}-triple{{.*}}nvptx64-nvidia-cuda{{.*}}-mlink-builtin-bitcode{{.*}}libomptarget-nvptx-test.bc
-
+// CHK-BCLIB-USER-DIR: clang{{.*}}-triple{{.*}}nvptx64-nvidia-cuda{{.*}}-mlink-builtin-bitcode{{.*}}libomptarget{{.}}libomptarget-nvptx-sm_35.bc
 // CHK-BCLIB-NOT: {{error:|warning:}}
----------------
`-###` escapes backslashes in Windows paths UNIX-style (which actually is unnecessary/wrong, the cmd.exe escape character is `^`, but windows also [[ https://stackoverflow.com/q/33027024 | ignores consecutive slashes ]]), so the actual output is
```
"-mlink-builtin-bitcode" "[...]\\clang\\test\\Driver/Inputs/libomptarget\\libomptarget-nvptx-sm_35.bc"
```

The regex `{{.}}` does not capture the double backslash. `{{/|\\\\}}` would work.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109057/new/

https://reviews.llvm.org/D109057



More information about the cfe-commits mailing list