[PATCH] D142916: [lld-macho] Warn on method name collisions from category definitions

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 30 10:51:10 PST 2023


int3 created this revision.
Herald added projects: lld-macho, All.
Herald added a reviewer: lld-macho.
int3 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

(this diff is still in draft mode; the test in particular needs to be
cleaned up / relocated)

This implements ld64's checks for duplicate method names in categories &
classes.

In addition, this sets us up for implementing Obj-C category merging.
This diff handles the most of the parsing work; what's left is rewriting
those category / class structures.

Numbers for chromium_framework:

             base           diff           difference (95% CI)
  sys_time   2.182 ± 0.027  2.200 ± 0.047  [  -0.2% ..   +1.8%]
  user_time  6.451 ± 0.034  6.479 ± 0.062  [  -0.0% ..   +0.9%]
  wall_time  6.841 ± 0.048  6.885 ± 0.105  [  -0.1% ..   +1.4%]
  samples    33             22


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142916

Files:
  lld/MachO/Driver.cpp
  lld/MachO/InputFiles.cpp
  lld/MachO/InputSection.cpp
  lld/MachO/InputSection.h
  lld/MachO/Layout.h
  lld/MachO/ObjC.cpp
  lld/MachO/ObjC.h
  lld/MachO/Relocations.cpp
  lld/MachO/Relocations.h
  lld/MachO/UnwindInfoSection.cpp
  lld/test/MachO/lit.local.cfg
  lld/test/MachO/objc-category-conflicts.m

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142916.493356.patch
Type: text/x-patch
Size: 24232 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230130/500aa59e/attachment.bin>


More information about the llvm-commits mailing list