[lld] 2968467 - [lld-macho][test] Add missing coverage for archive/dylib resolution after D115092
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 10 19:36:29 PST 2022
Author: Fangrui Song
Date: 2022-01-10T19:36:24-08:00
New Revision: 2968467e3990f89d49f312f1a5576b229deae9bd
URL: https://github.com/llvm/llvm-project/commit/2968467e3990f89d49f312f1a5576b229deae9bd
DIFF: https://github.com/llvm/llvm-project/commit/2968467e3990f89d49f312f1a5576b229deae9bd.diff
LOG: [lld-macho][test] Add missing coverage for archive/dylib resolution after D115092
When `file->fetch(sym)` is replaced with a no-op, no test fails.
The new test catches the case.
Reviewed By: #lld-macho, oontvoo
Differential Revision: https://reviews.llvm.org/D116916
Added:
Modified:
lld/test/MachO/weak-definition-direct-fetch.s
Removed:
################################################################################
diff --git a/lld/test/MachO/weak-definition-direct-fetch.s b/lld/test/MachO/weak-definition-direct-fetch.s
index 8c90be506bb4e..6dd458f748107 100644
--- a/lld/test/MachO/weak-definition-direct-fetch.s
+++ b/lld/test/MachO/weak-definition-direct-fetch.s
@@ -101,6 +101,8 @@
# RUN: llvm-objdump --macho --lazy-bind --syms %t/weak-ar-weak-ref-weak-dylib | FileCheck %s --check-prefix=PREFER-WEAK-OBJECT
# RUN: %lld -dylib -lSystem -o %t/weak-ref-weak-dylib-weak-ar -L%t -lweakfoo %t/weakfoo.a %t/weak-refs-foo.o
# RUN: llvm-objdump --macho --lazy-bind --syms %t/weak-ref-weak-dylib-weak-ar | FileCheck %s --check-prefix=PREFER-WEAK-OBJECT
+# RUN: %lld -dylib -lSystem -o %t/weak-ref-weak-dylib-weak-ar -L%t -lweakfoo %t/weak-refs-foo.o %t/weakfoo.a
+# RUN: llvm-objdump --macho --lazy-bind --syms %t/weak-ref-weak-dylib-weak-ar | FileCheck %s --check-prefix=PREFER-WEAK-OBJECT
#--- foo.s
.globl _foo
More information about the llvm-commits
mailing list