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

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri May 28 15:16:05 PDT 2021


Author: Fangrui Song
Date: 2021-05-28T15:15:59-07:00
New Revision: 2644399ce7721cba9a546a9af09fd2a942a4d0cd

URL: https://github.com/llvm/llvm-project/commit/2644399ce7721cba9a546a9af09fd2a942a4d0cd
DIFF: https://github.com/llvm/llvm-project/commit/2644399ce7721cba9a546a9af09fd2a942a4d0cd.diff

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

Added: 
    

Modified: 
    lld/test/MachO/lto-archive.ll
    lld/test/MachO/treat-undef-sym.s
    lld/test/MachO/u.s

Removed: 
    


################################################################################
diff  --git a/lld/test/MachO/lto-archive.ll b/lld/test/MachO/lto-archive.ll
index 98ec4de0d5cdf..80b6784c097df 100644
--- a/lld/test/MachO/lto-archive.ll
+++ b/lld/test/MachO/lto-archive.ll
@@ -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
 

diff  --git a/lld/test/MachO/treat-undef-sym.s b/lld/test/MachO/treat-undef-sym.s
index 23fe47ac42145..18205c208a96d 100644
--- a/lld/test/MachO/treat-undef-sym.s
+++ b/lld/test/MachO/treat-undef-sym.s
@@ -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

diff  --git a/lld/test/MachO/u.s b/lld/test/MachO/u.s
index 58519230c7c62..59fb79689e8c6 100644
--- a/lld/test/MachO/u.s
+++ b/lld/test/MachO/u.s
@@ -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


        


More information about the llvm-commits mailing list