[ObjC] Encode pointers to C++ classes as "^v" if the encoded string
authorAkira Hatanaka <ahatanaka@apple.com>
Thu, 18 Feb 2021 17:38:26 +0000 (09:38 -0800)
committerAkira Hatanaka <ahatanaka@apple.com>
Thu, 18 Feb 2021 17:38:26 +0000 (09:38 -0800)
commitb87a120820989844dc206c66bd0272b5238a14d1
tree0c0f5f4c03ecbe67b5ffe8a17f72cb63b46fb340
parentdcebe8ab1e26f8ea2fc91e12a20fadc5677407a0
[ObjC] Encode pointers to C++ classes as "^v" if the encoded string
would otherwise include template specialization types

This helps reduce the size of the encoded C++ type strings in the binary.

This is enabled by default only on Darwin, but can be enabled/disabled
via command line options.

rdar://63288571

Differential Revision: https://reviews.llvm.org/D96816
clang/include/clang/Basic/LangOptions.def
clang/include/clang/Driver/Options.td
clang/lib/AST/ASTContext.cpp
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/CodeGenObjCXX/encode.mm
clang/test/Driver/objc-encode-cxx-class-template-spec.m [new file with mode: 0644]