[lld] [lld-macho] Category merger: handle addends when getting symbol at offset (PR #91238)
Vincent Lee via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 24 18:06:13 PDT 2024
================
@@ -0,0 +1,410 @@
+# REQUIRES: aarch64
+# RUN: rm -rf %t; mkdir %t && cd %t
+
+############ Test merging multiple categories into a single category ############
+## Apply category merging to swiftc code just make sure we can handle addends
+## and don't erase category names for swift -- in order to not crash
+# RUN: llvm-mc -filetype=obj -triple=arm64-apple-macos -o cat_swift.o %s
+# RUN: %lld -arch arm64 -dylib -o cat_swift.dylib cat_swift.o -objc_category_merging
+# RUN: llvm-objdump --objc-meta-data --macho cat_swift.dylib | FileCheck %s --check-prefixes=CHECK-MERGE
+
+; CHECK-MERGE: Contents of (__DATA_CONST,__objc_classlist) section
+; CHECK-MERGE: _$s11SimpleClassAACN
----------------
thevinster wrote:
```suggestion
; CHECK-MERGE-NEXT: _$s11SimpleClassAACN
```
If these are all consecutive, practice is to use `-NEXT` here and the rest below.
https://github.com/llvm/llvm-project/pull/91238
More information about the llvm-commits
mailing list