From 2968467e3990f89d49f312f1a5576b229deae9bd Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Mon, 10 Jan 2022 19:36:24 -0800 Subject: [PATCH] [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 --- lld/test/MachO/weak-definition-direct-fetch.s | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lld/test/MachO/weak-definition-direct-fetch.s b/lld/test/MachO/weak-definition-direct-fetch.s index 8c90be5..6dd458f 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 -- 2.7.4