Skip to content

Commit 253e22f

Browse files
Kyungwoo Leechencha3
authored andcommitted
Revert "[lld-macho] Implement ObjC category merging (-objc_category_merging) (llvm#82928)"
This reverts commit ece2903, llvm#82928. llvm#82928
1 parent 70bba71 commit 253e22f

File tree

7 files changed

+8
-1862
lines changed

7 files changed

+8
-1862
lines changed

lld/MachO/Driver.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,8 +1437,6 @@ bool link(ArrayRef<const char *> argsArr, llvm::raw_ostream &stdoutOS,
14371437
resetOutputSegments();
14381438
resetWriter();
14391439
InputFile::resetIdCount();
1440-
1441-
objc::doCleanup();
14421440
};
14431441

14441442
ctx->e.logName = args::getFilenameWithoutExe(argsArr[0]);
@@ -1981,16 +1979,9 @@ bool link(ArrayRef<const char *> argsArr, llvm::raw_ostream &stdoutOS,
19811979
if (config->deadStrip)
19821980
markLive();
19831981

1984-
// Categories are not subject to dead-strip. The __objc_catlist section is
1985-
// marked as NO_DEAD_STRIP and that propagates into all category data.
19861982
if (args.hasArg(OPT_check_category_conflicts))
19871983
objc::checkCategories();
19881984

1989-
// Category merging uses "->live = false" to erase old category data, so
1990-
// it has to run after dead-stripping (markLive).
1991-
if (args.hasArg(OPT_objc_category_merging, OPT_no_objc_category_merging))
1992-
objc::mergeCategories();
1993-
19941985
// ICF assumes that all literals have been folded already, so we must run
19951986
// foldIdenticalLiterals before foldIdenticalSections.
19961987
foldIdenticalLiterals();

lld/MachO/InputSection.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ class InputSection {
9393
// .subsections_via_symbols, there is typically only one element here.
9494
llvm::TinyPtrVector<Defined *> symbols;
9595

96+
protected:
9697
const Section &section;
9798

98-
protected:
9999
const Defined *getContainingSymbol(uint64_t off) const;
100100
};
101101

0 commit comments

Comments
 (0)