;; Test --prefix option platform specific behavior. ; REQUIRES: system-windows ;; Test removal of trailing separators (both '/' and '\' on Windows systems). ;; The prefix 'myprefix/\' is changed to 'myprefix'. ; RUN: sed -e "s,SRC_COMPDIR,/Inputs,g" %p/Inputs/source-interleave.ll > %t.ll ; RUN: llc -o %t.o -filetype=obj -mtriple=x86_64-pc-linux %t.ll ; RUN: llvm-objdump --prefix 'myprefix/\' --source %t.o 2>&1 | FileCheck %s -DFILE=%t.o -DPREFIX='myprefix' -DSEP=%{fs-sep} ;; When --prefix is specified and the file path is absolute, sys::path::append ;; is used to add the file path to the prefix. On Windows, if the file path ;; starts with a slash, sys::path::append currently does a straight ;; concatenation, resulting in the first slash being preserved as-is ('/'). ;; The second slash (after 'Inputs') is generated by llc using ;; sys::path::append to join the directory and filename, which uses the ;; preferred path separator (controlled by LLVM_WINDOWS_PREFER_FORWARD_SLASH). ; CHECK: warning: '[[FILE]]': failed to find source [[PREFIX]]/Inputs[[SEP]]source-interleave-x86_64.c