Skip to content

Commit 40a7e68

Browse files
author
Alex B
committed
Address Feedback #5
1 parent 4ea30b4 commit 40a7e68

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lld/MachO/ObjC.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ class ObjcCategoryMerger {
489489
InfoCategoryWriter infoCategoryWriter;
490490
std::vector<ConcatInputSection *> &allInputSections;
491491
// Map of base class Symbol to list of InfoInputCategory's for it
492-
std::map<const Symbol *, std::vector<InfoInputCategory>> categoryMap;
492+
DenseMap<const Symbol *, std::vector<InfoInputCategory>> categoryMap;
493493

494494
// Normally, the binary data comes from the input files, but since we're
495495
// generating binary data ourselves, we use the below array to store it in.
@@ -1064,6 +1064,7 @@ void ObjcCategoryMerger::collectAndValidateCategoriesData() {
10641064
"Failed to get a valid cateogry at __objc_catlit offset");
10651065

10661066
// We only support ObjC categories (no swift + @objc)
1067+
// TODO: Support swift + @objc categories also
10671068
if (!categorySym->getName().starts_with(objc::symbol_names::category))
10681069
continue;
10691070

@@ -1096,14 +1097,14 @@ void ObjcCategoryMerger::generateCatListForNonErasedCategories(
10961097
catListToErasedOffsets) {
10971098

10981099
// Go through all offsets of all __objc_catlist's that we process and if there
1099-
// are categories that we didn't process - generate a new __objv_catlist for
1100+
// are categories that we didn't process - generate a new __objc_catlist for
11001101
// each.
11011102
for (auto &mapEntry : catListToErasedOffsets) {
11021103
ConcatInputSection *catListIsec = mapEntry.first;
11031104
for (uint32_t catListIsecOffset = 0;
11041105
catListIsecOffset < catListIsec->data.size();
11051106
catListIsecOffset += target->wordSize) {
1106-
// This slot was erased, we can jsut skip it
1107+
// This slot was erased, we can just skip it
11071108
if (mapEntry.second.count(catListIsecOffset))
11081109
continue;
11091110

0 commit comments

Comments
 (0)