Skip to content

Commit

Permalink
[lld-macho][test] Add missing coverage for archive/dylib resolution a…
Browse files Browse the repository at this point in the history
…fter 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
  • Loading branch information
MaskRay committed Jan 11, 2022
1 parent 9ea772f commit 2968467
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lld/test/MachO/weak-definition-direct-fetch.s
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2968467

Please sign in to comment.