@@ -489,7 +489,7 @@ class ObjcCategoryMerger {
489
489
InfoCategoryWriter infoCategoryWriter;
490
490
std::vector<ConcatInputSection *> &allInputSections;
491
491
// 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;
493
493
494
494
// Normally, the binary data comes from the input files, but since we're
495
495
// generating binary data ourselves, we use the below array to store it in.
@@ -1064,6 +1064,7 @@ void ObjcCategoryMerger::collectAndValidateCategoriesData() {
1064
1064
" Failed to get a valid cateogry at __objc_catlit offset" );
1065
1065
1066
1066
// We only support ObjC categories (no swift + @objc)
1067
+ // TODO: Support swift + @objc categories also
1067
1068
if (!categorySym->getName ().starts_with (objc::symbol_names::category))
1068
1069
continue ;
1069
1070
@@ -1096,14 +1097,14 @@ void ObjcCategoryMerger::generateCatListForNonErasedCategories(
1096
1097
catListToErasedOffsets) {
1097
1098
1098
1099
// 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
1100
1101
// each.
1101
1102
for (auto &mapEntry : catListToErasedOffsets) {
1102
1103
ConcatInputSection *catListIsec = mapEntry.first ;
1103
1104
for (uint32_t catListIsecOffset = 0 ;
1104
1105
catListIsecOffset < catListIsec->data .size ();
1105
1106
catListIsecOffset += target->wordSize ) {
1106
- // This slot was erased, we can jsut skip it
1107
+ // This slot was erased, we can just skip it
1107
1108
if (mapEntry.second .count (catListIsecOffset))
1108
1109
continue ;
1109
1110
0 commit comments