[PATCH] D56555: Add Attribute to define nonlazy objc classes
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 31 10:26:13 PST 2019
rjmccall added inline comments.
================
Comment at: clang/include/clang/Basic/AttrDocs.td:3506
+add the class to the list of non-lazily initialized classes. These are classes
+that are realized at objc_init() time rather than when first referenced.
+ }];
----------------
aaron.ballman wrote:
> Add backticks around `objc_init()` because it should be in code font.
I don't think "`objc_init()` time" is a widely-recognized concept. How about:
A non-lazy class will be initialized eagerly when the Objective-C runtime is loaded. This is required for certain system classes which have instances allocated in non-standard ways, such as the classes for blocks and constant strings. Adding this attribute is essentially equivalent to providing a trivial `+load` method but avoids the (fairly small) load-time overheads associated with defining and calling such a method.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56555/new/
https://reviews.llvm.org/D56555
More information about the cfe-commits
mailing list