1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/test/tools/llvm-objdump/X86/source-interleave-prefix-windows.test
Vinicius Tinti 5921789295 [llvm-objdump][test] Fix --prefix tests for system-windows
Merging directories and files may produce different results on different
platforms.

Merging "./Inputs" and "source-interleave-x86_64.c" will use different
separators in POSIX and Windows.

Dedicated tests are needed for dealing with removing trailing separators
for POSIX (consider only '/') and Windows (consider '/' and '\').

Fixes D85024.
Fixes PR46368.

Reviewed By: jhenderson, MaskRay

Differential revision: https://reviews.llvm.org/D95513
2021-02-09 21:54:51 +00:00

12 lines
561 B
Plaintext

;; 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'
; CHECK: warning: '[[FILE]]': failed to find source [[PREFIX]]/Inputs\source-interleave-x86_64.c