[PATCH] D74477: [llvm-ar] Simplify Windows comparePaths NFCI
Andrew Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 14 03:24:21 PST 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG430fc538e6dc: [llvm-ar] Simplify Windows comparePaths NFCI (authored by andrewng).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74477/new/
https://reviews.llvm.org/D74477
Files:
llvm/tools/llvm-ar/llvm-ar.cpp
Index: llvm/tools/llvm-ar/llvm-ar.cpp
===================================================================
--- llvm/tools/llvm-ar/llvm-ar.cpp
+++ llvm/tools/llvm-ar/llvm-ar.cpp
@@ -21,6 +21,7 @@
#include "llvm/Object/ObjectFile.h"
#include "llvm/Support/Chrono.h"
#include "llvm/Support/CommandLine.h"
+#include "llvm/Support/ConvertUTF.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Format.h"
@@ -518,8 +519,8 @@
// binary equivalence and allows for case insensitivity.
#ifdef _WIN32
SmallVector<wchar_t, 128> WPath1, WPath2;
- failIfError(sys::path::widenPath(normalizePath(Path1), WPath1));
- failIfError(sys::path::widenPath(normalizePath(Path2), WPath2));
+ failIfError(sys::windows::UTF8ToUTF16(normalizePath(Path1), WPath1));
+ failIfError(sys::windows::UTF8ToUTF16(normalizePath(Path2), WPath2));
return CompareStringOrdinal(WPath1.data(), WPath1.size(), WPath2.data(),
WPath2.size(), true) == CSTR_EQUAL;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74477.244606.patch
Type: text/x-patch
Size: 1011 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200214/989bbf65/attachment.bin>
More information about the llvm-commits
mailing list