summaryrefslogtreecommitdiff
path: root/lld/test
diff options
context:
space:
mode:
authorJez Ng <jezng@fb.com>2023-03-31 13:19:48 -0400
committerJez Ng <jezng@fb.com>2023-03-31 13:20:23 -0400
commit855d3cb8e3e831a48378865575bf950deda1ecf1 (patch)
tree4eac1b953b8f664fddc265c1767c2d7dbbab208e /lld/test
parent3520f6d6664549f61015f3f5b3a2afd8edbf976b (diff)
downloadllvm-855d3cb8e3e831a48378865575bf950deda1ecf1.tar.gz
[lld-macho] Gate category checking behind --check-category-conflicts
@oontvoo reports that the current implementation crashes on a bunch of their builds. Let's leave it disabled by default for now. Reviewed By: #lld-macho, oontvoo Differential Revision: https://reviews.llvm.org/D147341
Diffstat (limited to 'lld/test')
-rw-r--r--lld/test/MachO/objc-category-conflicts.s12
1 files changed, 8 insertions, 4 deletions
diff --git a/lld/test/MachO/objc-category-conflicts.s b/lld/test/MachO/objc-category-conflicts.s
index da1b0c6b38d7..59a9ed50eb05 100644
--- a/lld/test/MachO/objc-category-conflicts.s
+++ b/lld/test/MachO/objc-category-conflicts.s
@@ -9,21 +9,25 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos11.0 -I %t %t/klass-with-no-rodata.s -o %t/klass-with-no-rodata.o
# RUN: %lld -dylib -lobjc %t/klass.o -o %t/libklass.dylib
-# RUN: %no-fatal-warnings-lld -dylib -lobjc %t/klass.o %t/cat1.o %t/cat2.o -o \
+# RUN: %no-fatal-warnings-lld --check-category-conflicts -dylib -lobjc %t/klass.o %t/cat1.o %t/cat2.o -o \
# RUN: /dev/null 2>&1 | FileCheck %s --check-prefixes=CATCLS,CATCAT
-# RUN: %no-fatal-warnings-lld -dylib -lobjc %t/libklass.dylib %t/cat1.o \
+# RUN: %no-fatal-warnings-lld --check-category-conflicts -dylib -lobjc %t/libklass.dylib %t/cat1.o \
# RUN: %t/cat2.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=CATCAT
## Check that we don't emit spurious warnings around the +load method while
## still emitting the other warnings. Note that we have made separate
## `*-with-load.s` files for ease of comparison with ld64; ld64 will not warn
## at all if multiple +load methods are present.
-# RUN: %no-fatal-warnings-lld -dylib -lobjc %t/klass-with-load.o \
+# RUN: %no-fatal-warnings-lld --check-category-conflicts -dylib -lobjc %t/klass-with-load.o \
# RUN: %t/cat1-with-load.o %t/cat2-with-load.o -o /dev/null 2>&1 | \
# RUN: FileCheck %s --check-prefixes=CATCLS,CATCAT --implicit-check-not '+load'
## Regression test: Check that we don't crash.
-# RUN: %no-fatal-warnings-lld -dylib -lobjc %t/klass-with-no-rodata.o -o /dev/null
+# RUN: %no-fatal-warnings-lld --check-category-conflicts -dylib -lobjc %t/klass-with-no-rodata.o -o /dev/null
+
+## Check that we don't emit any warnings without --check-category-conflicts.
+# RUN: %no-fatal-warnings-lld -dylib -lobjc %t/klass.o %t/cat1.o %t/cat2.o -o \
+# RUN: /dev/null 2>&1 | FileCheck %s --implicit-check-not 'warning' --allow-empty
# CATCLS: warning: method '+s1' has conflicting definitions:
# CATCLS-NEXT: >>> defined in category Cat1 from {{.*}}cat1{{.*}}.o