[PATCH] D99210: [lld-macho][nfc] minor clean up, follow up to D98559

Vy Nguyen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 23 20:00:43 PDT 2021


oontvoo updated this revision to Diff 332854.
oontvoo added a comment.

Updated path-expectations to accept both backslash and forwardslash.

Will wait and commit this tomorrow.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99210/new/

https://reviews.llvm.org/D99210

Files:
  lld/MachO/DriverUtils.cpp
  lld/test/MachO/dependency-info.s


Index: lld/test/MachO/dependency-info.s
===================================================================
--- lld/test/MachO/dependency-info.s
+++ lld/test/MachO/dependency-info.s
@@ -1,7 +1,4 @@
 # REQUIRES: x86
-## FIXME: Paths on windows have both `\` and '/', as a result, they are in a different
-## order when sorted. Maybe create a separate test for that?
-# UNSUPPORTED: system-windows
 #
 # RUN: rm -rf %t
 # RUN: split-file %s %t
@@ -16,13 +13,13 @@
 # RUN: %python %S/Inputs/DependencyDump.py %t/deps_info.out | FileCheck %s
 
 # CHECK: lld-version: {{.*}}LLD {{.*}}
-# CHECK-DAG: input-file: {{.*}}/bar.a
-# CHECK-DAG: input-file: {{.*}}/libfoo.dylib
-# CHECK-DAG: input-file: {{.*}}/libSystem.tbd
-# CHECK-DAG: input-file: {{.*}}/main.o
+# CHECK-DAG: input-file: {{.*}}{{[/\]}}bar.a
+# CHECK-DAG: input-file: {{.*}}{{[/\]}}libfoo.dylib
+# CHECK-DAG: input-file: {{.*}}{{[/\]}}libSystem.tbd
+# CHECK-DAG: input-file: {{.*}}{{[/\]}}main.o
 # CHECK-DAG: bar.o
 
-# CHECK-NEXT: not-found: {{.*}}/libdyld.dylib
+# CHECK-NEXT: not-found: {{.*}}{{[/\]}}libdyld.{{.*}}
 ## There could be more not-found here but we are not checking those because it's brittle.
 
 # CHECK: output-file: a.out
Index: lld/MachO/DriverUtils.cpp
===================================================================
--- lld/MachO/DriverUtils.cpp
+++ lld/MachO/DriverUtils.cpp
@@ -284,8 +284,8 @@
   inputNames.reserve(inputs.size());
   for (InputFile *f : inputs)
     inputNames.push_back(f->getName());
-  llvm::sort(inputNames,
-             [](const StringRef &a, const StringRef &b) { return a < b; });
+  llvm::sort(inputNames);
+
   for (const StringRef &in : inputNames)
     addDep(DepOpCode::Input, in);
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99210.332854.patch
Type: text/x-patch
Size: 1700 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210324/e61c7c36/attachment.bin>


More information about the llvm-commits mailing list