llvm-project/clang/utils
John McCall 2c91c3b7af Add the `objc_class_stub` attribute.
Swift requires certain classes to be not just initialized lazily on first
use, but actually allocated lazily using information that is only available
at runtime.  This is incompatible with ObjC class initialization, or at least
not efficiently compatible, because there is no meaningful class symbol
that can be put in a class-ref variable at load time.  This leaves ObjC
code unable to access such classes, which is undesirable.

objc_class_stub says that class references should be resolved by calling
a new ObjC runtime function with a pointer to a new "class stub" structure.
Non-ObjC compilers (like Swift) can simply emit this structure when ObjC
interop is required for a class that cannot be statically allocated,
then apply this attribute to the `@interface` in the generated ObjC header
for the class.

This attribute can be thought of as a generalization of the existing
`objc_runtime_visible` attribute which permits more efficient class
resolution as well as supporting the additon of categories to the class.
Subclassing these classes from ObjC is currently not allowed.

Patch by Slava Pestov!

llvm-svn: 362054
2019-05-30 04:09:01 +00:00
..
ABITest Portable Python script across Python version 2018-12-18 16:07:37 +00:00
CIndex Portable Python script across Python version 2018-12-18 16:07:37 +00:00
ClangVisualizers Have MSVC Visualizer for DeducedTemplateSpecializationType show both the original template and deduced specialization 2019-01-06 04:58:48 +00:00
TableGen Add the `objc_class_stub` attribute. 2019-05-30 04:09:01 +00:00
TestUtils Portable Python script across Python version 2018-12-18 16:07:37 +00:00
VtableTest Remove autoconf support 2016-01-26 21:30:40 +00:00
analyzer [analyzer] SATestBuild.py: Use driver for analyzing single-file tests. 2019-05-29 18:49:31 +00:00
check_cfc Portable Python script across Python version 2019-01-03 14:27:05 +00:00
hmaptool Portable Python script across Python version 2018-12-18 16:07:37 +00:00
perf-training Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
valgrind
CaptureCmd
ClangDataFormat.py
CmpDriver
FindSpecRefs
FuzzTest
bash-autocomplete.sh [bash-completion] Fix tab separation on macOS 2018-05-24 16:25:40 +00:00
builtin-defines.c
clangdiag.py Portable Python script across Python version 2018-12-18 16:07:37 +00:00
creduce-clang-crash.py Make clang/utils/creduce-clang-crash.py executable 2019-05-01 20:15:39 +00:00
find-unused-diagnostics.sh Unused diagnostics can occur in tblgen. 2018-01-25 15:57:22 +00:00
modfuzz.py Portable Python script across Python version 2018-12-18 16:07:37 +00:00
token-delta.py Portable Python script across Python version 2018-12-18 16:07:37 +00:00