[lld] [lld-macho] Category Merger: add support for addrsig references (PR #90903)
Kyungwoo Lee via llvm-commits
llvm-commits at lists.llvm.org
Thu May 2 17:06:33 PDT 2024
================
@@ -1183,26 +1193,66 @@ void ObjcCategoryMerger::eraseMergedCategories() {
// the references to the ones we merged.
generateCatListForNonErasedCategories(catListToErasedOffsets);
+ // We use erasedIsecs below to track erased sections so we can later remove
+ // references to it.
+ std::unordered_set<InputSection *> erasedIsecs;
+ erasedIsecs.reserve(categoryMap.size());
+
// Erase the old method lists & names of the categories that were merged
for (auto &mapEntry : categoryMap) {
for (InfoInputCategory &catInfo : mapEntry.second) {
if (!catInfo.wasMerged)
continue;
+ erasedIsecs.insert(catInfo.catBodyIsec);
+ erasedIsecs.insert(catInfo.catListIsec);
----------------
kyulee-com wrote:
I'm trying to follow if `erasedIsecs` is inserted when `eraseISec` is called. So, is this line expected?
https://github.com/llvm/llvm-project/pull/90903
More information about the llvm-commits
mailing list