[PATCH] D68033: [llvm-ar] Make paths case insensitive when on windows
Jordan Rupprecht via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 26 10:42:21 PDT 2019
rupprecht added inline comments.
================
Comment at: llvm/test/tools/llvm-ar/windows-case.test:6
+# 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
----------------
Can you check the contents after this step too to make sure the filename case is preserved, and the normalization is only used for comparison?
================
Comment at: llvm/test/tools/llvm-ar/windows-case.test:14
+
+# ARCHIVE: FILE.TXT
+
----------------
Can you filecheck w/ the actual contents (FileCheck --input-file=%t/archive.a) instead of using llvm-ar t? It would be good to assert the file contents are replaced too.
================
Comment at: llvm/tools/llvm-ar/llvm-ar.cpp:492-493
+ if (Triple(sys::getProcessTriple()).isOSWindows()) {
+ std::transform(NormalizedPath.begin(), NormalizedPath.end(),
+ NormalizedPath.begin(), ::toupper);
+ }
----------------
nit: `llvm::transform(NormalizedPath, NormalizedPath.begin(), ::toupper);`
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68033/new/
https://reviews.llvm.org/D68033
More information about the llvm-commits
mailing list