mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-01 21:04:04 -04:00
[llvm-ar] Make paths case insensitive when on windows
When on windows gnu-ar treats member names as case insensitive. This commit implements the same behaviour. Differential Revision: https://reviews.llvm.org/D68033 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@375002 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
!<arch>
|
||||
// 22 `
|
||||
a/foo.txt/
|
||||
b/foo.txt/
|
||||
/0 0 0 0 644 8 `
|
||||
hello-a
|
||||
/11 0 0 0 644 8 `
|
||||
hello-b
|
||||
@@ -0,0 +1,27 @@
|
||||
## Test that on windows, members are case insensitive.
|
||||
# UNSUPPORTED: system-windows
|
||||
|
||||
# RUN: mkdir -p %t
|
||||
# RUN: rm -rf %t/lowerCase %t/UPPERCASE && mkdir %t/lowerCase %t/UPPERCASE
|
||||
# RUN: echo lowerCase > %t/lowerCase/file.txt
|
||||
# RUN: echo UPPERCASE > %t/UPPERCASE/FILE.TXT
|
||||
|
||||
# RUN: rm -f %t/archive.a
|
||||
# RUN: llvm-ar rc %t/archive.a %t/lowerCase/file.txt
|
||||
# RUN: llvm-ar rc %t/archive.a %t/UPPERCASE/FILE.TXT
|
||||
# RUN: FileCheck %s -input-file=%t/archive.a --check-prefix=ARCHIVE
|
||||
|
||||
# ARCHIVE: file.txt
|
||||
# ARCHIVE: FILE.TXT
|
||||
|
||||
# RUN: rm -f %t/thin-archive.a
|
||||
# RUN: llvm-ar Trc %t/thin-archive.a %t/lowerCase/file.txt %t/UPPERCASE/FILE.TXT
|
||||
# RUN: llvm-ar dTP %t/thin-archive.a %t/uppercase/file.txt
|
||||
|
||||
# RUN: FileCheck %s -input-file=%t/thin-archive.a --check-prefix=THIN-ARCHIVE -DPATH=%/t
|
||||
|
||||
# RUN: llvm-ar dTP %t/thin-archive.a %t/LOWERCASE/FILE.TXT
|
||||
# RUN: FileCheck %s -input-file=%t/thin-archive.a --check-prefix=THIN-ARCHIVE -DPATH=%/t
|
||||
|
||||
# THIN-ARCHIVE: [[PATH]]/lowerCase/file.txt
|
||||
# THIN-ARCHIVE: [[PATH]]/UPPERCASE/FILE.TXT
|
||||
@@ -0,0 +1,9 @@
|
||||
RUN: llvm-ar t %S/Inputs/path-names.a | FileCheck %s --check-prefix=CONTENTS --implicit-check-not {{.}}
|
||||
CONTENTS: a/foo.txt
|
||||
CONTENTS-NEXT: b/foo.txt
|
||||
|
||||
RUN: llvm-ar p %S/Inputs/path-names.a b/foo.txt | FileCheck %s --check-prefix=NO-FULL-PATH --implicit-check-not {{.}}
|
||||
NO-FULL-PATH: hello-a
|
||||
|
||||
RUN: llvm-ar Pp %S/Inputs/path-names.a b/foo.txt | FileCheck %s --check-prefix=FULL-PATH --implicit-check-not {{.}}
|
||||
FULL-PATH: hello-b
|
||||
@@ -0,0 +1,29 @@
|
||||
## Test that on windows, members are case insensitive.
|
||||
# REQUIRES: system-windows
|
||||
|
||||
# RUN: mkdir -p %t
|
||||
# RUN: rm -rf %t/lowerCase %t/UPPERCASE && mkdir %t/lowerCase %t/UPPERCASE
|
||||
# RUN: echo lowerCase > %t/lowerCase/file.txt
|
||||
# RUN: echo UPPERCASE > %t/UPPERCASE/FILE.TXT
|
||||
|
||||
# RUN: rm -f %t/archive.a
|
||||
# RUN: llvm-ar rc %t/archive.a %t/lowerCase/file.txt
|
||||
# RUN: FileCheck %s -input-file=%t/archive.a --check-prefix=LOWER --implicit-check-not=FILE.TXT
|
||||
# RUN: llvm-ar rc %t/archive.a %t/UPPERCASE/FILE.TXT
|
||||
# RUN: FileCheck %s -input-file=%t/archive.a --check-prefix=UPPER --implicit-check-not=file.txt
|
||||
|
||||
# LOWER: file.txt
|
||||
# UPPER: FILE.TXT
|
||||
|
||||
# RUN: rm -f %t/thin-archive.a
|
||||
# RUN: llvm-ar Trc %t/thin-archive.a %t/lowerCase/file.txt %t/UPPERCASE/FILE.txt
|
||||
# RUN: llvm-ar dTP %t/thin-archive.a %t/uppercase/file.txt
|
||||
|
||||
# RUN: FileCheck %s -input-file=%t/thin-archive.a --check-prefix=THIN-ARCHIVE -DPATH=%/t
|
||||
# THIN-ARCHIVE-NOT: [[PATH]]/UPPERCASE/FILE.TXT
|
||||
# THIN-ARCHIVE: [[PATH]]/lowerCase/file.txt
|
||||
|
||||
# RUN: llvm-ar dTP %t/thin-archive.a %t/LOWERCASE/FILE.TXT
|
||||
# RUN: FileCheck %s -input-file=%t/thin-archive.a --check-prefix=EMPTY --implicit-check-not {{.}}
|
||||
|
||||
EMPTY: !<thin>
|
||||
Reference in New Issue
Block a user