mwyman added inline comments.
================ Comment at: clang/include/clang/Basic/Attr.td:2251-2256 +def ObjCDirectVisible : Attr { + let Spellings = [Clang<"objc_direct_visible">]; + let Subjects = SubjectList<[ObjCMethod], ErrorDiag>; + let LangOpts = [ObjC]; + let Documentation = [ObjCDirectVisibleDocs]; +} ---------------- Should this inherit `ObjCDirect`, to include both objc_direct and the visibility aspect? I don't see any reason we would want to add `objc_direct_visible` without also having `objc_direct`, so why make developers add both? As an alternative, would it make sense to allow adding `__attribute__((visibility("default")))` on direct methods? Also, it doesn't seem like this allows making `@property`s visible, so should there be a similar attribute for properties? ================ Comment at: clang/lib/CodeGen/CGObjCMac.cpp:4025-4036 + if (OMD->isDirectMethodVisible() && Fn->getName().str()[0] == '\1') { + // Drop '\1' to work with dlsym. + std::string Name = Fn->getName().str().substr(1); + + assert(Name[0] == '-' || Name[0] == '+'); + assert(Name[1] == '[' && Name[Name.length() - 1] == ']'); + ---------------- Should this move to clang/lib/AST/Mangle.cpp's mangleObjCMethodName? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86049/new/ https://reviews.llvm.org/D86049 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits