[lld-macho][test] Simplify --allow-empty with count 0

This commit is contained in:
Fangrui Song 2021-05-28 15:15:59 -07:00
parent 90310dfff8
commit 2644399ce7
3 changed files with 6 additions and 17 deletions

View File

@ -20,13 +20,9 @@
; OBJC: -ObjC forced load of has-objc-category.o
; OBJC: _OBJC_CLASS_$_Foo forced load of has-objc-symbol.o
; RUN: %lld -lSystem %t/foo.a %t/main.o -o %t/no-force-load -why_load | \
; RUN: FileCheck %s --allow-empty --check-prefix=NO-LOAD
; RUN: %lld -lSystem %t/foo.a %t/main.o -o %t/no-force-load -why_load | count 0
; RUN: %lld -lSystem -framework CoreFoundation %t/objc.a %t/main.o -o %t/no-objc -why_load | \
; RUN: FileCheck %s --allow-empty --check-prefix=NO-LOAD
; NO-LOAD-NOT: forced load
; RUN: %lld -lSystem -framework CoreFoundation %t/objc.a %t/main.o -o %t/no-objc -why_load | count 0
;--- foo.ll

View File

@ -10,8 +10,7 @@
# RUN: FileCheck %s -check-prefix=INVAL-WARNING
# RUN: not %lld -undefined suppress -o /dev/null %t.o 2>&1 | \
# RUN: FileCheck %s -check-prefix=INVAL-SUPPRESS
# RUN: %lld -undefined dynamic_lookup -lSystem -o %t.out %t.o 2>&1 | \
# RUN: FileCheck %s -check-prefix=SUPPRESS --allow-empty
# RUN: %lld -undefined dynamic_lookup -lSystem -o %t.out %t.o 2>&1 | count 0
# RUN: llvm-objdump --macho --lazy-bind %t.out \
# RUN: | FileCheck --check-prefix=BIND %s
@ -20,12 +19,10 @@
# RUN: FileCheck %s -check-prefix=WARNING
# RUN: llvm-objdump --macho --lazy-bind %t.out \
# RUN: | FileCheck --check-prefix=BIND %s
# RUN: %lld -flat_namespace -lSystem -undefined suppress -o %t.out %t.o 2>&1 | \
# RUN: FileCheck %s -check-prefix=SUPPRESS --allow-empty
# RUN: %lld -flat_namespace -lSystem -undefined suppress -o %t.out %t.o 2>&1 | count 0
# RUN: llvm-objdump --macho --lazy-bind %t.out \
# RUN: | FileCheck --check-prefix=BIND %s
# RUN: %lld -flat_namespace -lSystem -undefined dynamic_lookup -o %t.out %t.o 2>&1 | \
# RUN: FileCheck %s -check-prefix=SUPPRESS --allow-empty
# RUN: %lld -flat_namespace -lSystem -undefined dynamic_lookup -o %t.out %t.o 2>&1 | count 0
# RUN: llvm-objdump --macho --lazy-bind %t.out \
# RUN: | FileCheck --check-prefix=BIND %s
@ -41,8 +38,6 @@
# WARNING: warning: undefined symbol: _bar
# WARNING-NEXT: >>> referenced by
# SUPPRESS-NOT: undefined symbol: _bar
# UNKNOWN: unknown -undefined TREATMENT 'bogus'
# UNKNOWN-NEXT: error: undefined symbol: _bar
# UNKNOWN-NEXT: >>> referenced by

View File

@ -6,8 +6,7 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/main.o %t/main.s
# RUN: %lld -lSystem %t/main.o %t/lib.a -o /dev/null -why_load | \
# RUN: FileCheck %s --check-prefix=NOFOO --allow-empty
# RUN: %lld -lSystem %t/main.o %t/lib.a -o /dev/null -why_load | count 0
# RUN: %lld -lSystem %t/main.o %t/lib.a -u _foo -o /dev/null -why_load | \
# RUN: FileCheck %s --check-prefix=FOO
@ -18,7 +17,6 @@
# RUN: %lld -lSystem %t/main.o %t/lib.a -u _asdf -undefined dynamic_lookup -o %t/dyn-lookup
# RUN: llvm-objdump --macho --syms %t/dyn-lookup | FileCheck %s --check-prefix=DYN
# NOFOO-NOT: _foo forced load of {{.+}}lib.a(foo.o)
# FOO: _foo forced load of {{.+}}lib.a(foo.o)
# UNDEF: error: undefined symbol: _asdf
# UNDEF-NEXT: >>> referenced by -u