When checking the segment name for Swift symbols, we should be checking that they start with __swift instead of checking for equality
Fixes the issue https://github.com/llvm/llvm-project/issues/55355
Differential D125250
[lld/macho] Fixes the -ObjC flag tt on May 9 2022, 11:26 AM. Authored by
Details
When checking the segment name for Swift symbols, we should be checking that they start with __swift instead of checking for equality Fixes the issue https://github.com/llvm/llvm-project/issues/55355
Diff Detail
Event TimelineComment Actions
There are several __swift* sections, in fact, I haven't run into a __swift section at all. protocol Blah {} extension Blah { func foobar() { } } func noop() {} /tmp/Blah.o: file format mach-o 64-bit x86-64 Sections: Idx Name Size VMA Type 0 __text 00000026 0000000000000000 TEXT 1 __swift5_entry 00000004 0000000000000028 DATA 2 __swift5_typeref 0000000b 000000000000002c DATA 3 __swift5_fieldmd 00000010 0000000000000038 DATA 4 __const 0000002e 0000000000000048 DATA 5 __swift5_protos 00000004 0000000000000078 DATA 6 __swift_modhash 00000010 000000000000007c DATA 7 __objc_imageinfo 00000008 000000000000008c DATA 8 __compact_unwind 00000060 0000000000000098 DATA 9 __eh_frame 00000090 00000000000000f8 DATA SYMBOL TABLE: 0000000000000028 l O __TEXT,__swift5_entry l_entry_point 0000000000000038 l O __TEXT,__swift5_fieldmd _$s4BlahAA_pMF 0000000000000048 l O __TEXT,__const l___unnamed_1 0000000000000078 l O __TEXT,__swift5_protos l_protocols 000000000000007c l O __LLVM,__swift_modhash l_llvm.swift_module_hash 0000000000000020 g F __TEXT,__text _$s4Blah4noopyyF 000000000000005c g O __TEXT,__const _$s4BlahAAMp 0000000000000010 g F __TEXT,__text _$s4BlahAAPAAE6foobaryyF 0000000000000050 w O __TEXT,__const _$s4BlahMXM 0000000000000074 w O __TEXT,__const ___swift_reflection_version 0000000000000000 g F __TEXT,__text _main 000000000000002c w O __TEXT,__swift5_typeref _symbolic $s4BlahAAP
|
clang-format not found in user’s local PATH; not linting file.