This reduces code duplication between CGObjCMac.cpp and Mangle.cpp for generating the mangled name of an Objective-C method.
This has no intended functionality change.
Paths
| Differential D88329
[objc] Consolidate ObjC name mangle code to AST AbandonedPublic Authored by ellis on Sep 25 2020, 12:08 PM.
Details
Summary This reduces code duplication between CGObjCMac.cpp and Mangle.cpp for generating the mangled name of an Objective-C method. This has no intended functionality change.
Diff Detail
Unit TestsFailed Event Timelinerjmccall added inline comments.
This revision is now accepted and ready to land.Sep 25 2020, 6:47 PM Comment Actions [objc] Fix memory leak in CGObjCMac.cpp CGObjCMac.cpp was leaking a MangleContext everytime it mangled an ObjC method. We now have an instance variable that allocates and deallocates the context. vsapsai added inline comments.
Revision Contents
Diff 294461 clang/include/clang/AST/Mangle.h
clang/lib/AST/Mangle.cpp
clang/lib/CodeGen/CGObjCMac.cpp
|
Could you switch the polarity on the method names here, so that mangleObjCMethodName just mangles the method name like ObjC would and there's a mangleObjCMethodNameAsSourceName that appends something that obeys the Itanium source-name production? You'll need to switch the existing call sites, of course.