[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
       
    Thu Feb 16 13:10:57 PST 2023
    
    
  
int3 marked an inline comment as done.
int3 added inline comments.
================
Comment at: lld/MachO/Driver.cpp:1918
 
+    objc::checkCategories();
+
----------------
oontvoo wrote:
> maybe conditioned this under `-ObjC` ? (i mean, no reason to do the checks, walking thru lots of isecs if we know there's no objc code?)
Heh we actually have builds that contain ObjC but don't use the -ObjC flag
================
Comment at: lld/MachO/ObjC.cpp:284-290
+  for (const InputSection *isec : inputSections) {
+    if (isec->getName() == section_names::objcCatList)
+      for (const Reloc &r : isec->relocs) {
+        auto *catIsec = cast<ConcatInputSection>(r.getReferentInputSection());
+        checker.parseCategory(catIsec);
+      }
+  }
----------------
oontvoo wrote:
> int3 wrote:
> > thevinster wrote:
> > > Benchmarks don't show a huge regression, but would it better to parallelize this loop? The only downside I see is warning diagnostics being indeterministic, but that might be a blocker for others. 
> > I want to wait till the category merging itself is implemented before attempting parallelization
> > 
> > I might also just delay landing this for a while
> We'd love to have this check asap =) 
> 
> (This should fix https://github.com/llvm/llvm-project/issues/54912)
ok, will land it soon :)
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142916/new/
https://reviews.llvm.org/D142916
    
    
More information about the llvm-commits
mailing list