This ports the start of the ObjC category merging pass from ld64 to lld.
This is used in code such as the following:
@interface A @end
@implementation A
+(void) foo {
}
@end
@interface A (Cat) @end
@implementation A (Cat)
+(void) bar {
}
@end
In this example, we would have a category list with the element 'A (Cat)'. This pass takes the methods from the category and adds them to the method list on the class 'A'. That is, class 'A' had a method list { foo } but after this pass will have { foo, bar }.
This is only the first of several optimizations in this area. This handles instance methods, but future commits will handle class methods, protocols, and properties. The code here is meant to be extensible in that i'll later need to add support for all the different offsets and atom types for those optimizations too.