[lld] dee5787 - Reland [lld-macho][nfc] minor clean up, follow up to D98559
Vy Nguyen via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 25 13:46:46 PDT 2021
Author: Vy Nguyen
Date: 2021-03-25T16:46:37-04:00
New Revision: dee5787d3ee5467b38f614c50023af0f7d1850d7
URL: https://github.com/llvm/llvm-project/commit/dee5787d3ee5467b38f614c50023af0f7d1850d7
DIFF: https://github.com/llvm/llvm-project/commit/dee5787d3ee5467b38f614c50023af0f7d1850d7.diff
LOG: Reland [lld-macho][nfc] minor clean up, follow up to D98559
This reverts commit 77b4230ed9bea541fd3fb04707e35308c2f34347.
New change: Fixed tests on windows
Differential Revision: https://reviews.llvm.org/D99210
Added:
Modified:
lld/MachO/DriverUtils.cpp
lld/test/MachO/dependency-info.s
Removed:
################################################################################
diff --git a/lld/MachO/DriverUtils.cpp b/lld/MachO/DriverUtils.cpp
index a12e1c537c16..49bd83ecf09a 100644
--- a/lld/MachO/DriverUtils.cpp
+++ b/lld/MachO/DriverUtils.cpp
@@ -284,8 +284,8 @@ void macho::DependencyTracker::write(llvm::StringRef version,
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);
diff --git a/lld/test/MachO/dependency-info.s b/lld/test/MachO/dependency-info.s
index a05445bcd652..9e69ea16980f 100644
--- a/lld/test/MachO/dependency-info.s
+++ b/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
diff erent
-## order when sorted. Maybe create a separate test for that?
-# UNSUPPORTED: system-windows
#
# RUN: rm -rf %t
# RUN: split-file %s %t
@@ -16,16 +13,17 @@
# 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: input-file: {{.*}}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: {{.*}}/test.out
+# CHECK: output-file: {{.*}}{{[/\]}}test.out
#--- foo.s
.globl __Z3foo
More information about the llvm-commits
mailing list