We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6b8d54d + ae8a506 commit d6619e5Copy full SHA for d6619e5
lib/AST/Type.cpp
@@ -4506,9 +4506,12 @@ ReferenceCounting TypeBase::getReferenceCounting() {
4506
ASTContext &ctx = type->getASTContext();
4507
4508
// In the absence of Objective-C interoperability, everything uses native
4509
- // reference counting.
4510
- if (!ctx.LangOpts.EnableObjCInterop)
4511
- return ReferenceCounting::Native;
+ // reference counting or is the builtin BridgeObject.
+ if (!ctx.LangOpts.EnableObjCInterop) {
+ return type->getKind() == TypeKind::BuiltinBridgeObject
4512
+ ? ReferenceCounting::Bridge
4513
+ : ReferenceCounting::Native;
4514
+ }
4515
4516
switch (type->getKind()) {
4517
#define SUGARED_TYPE(id, parent) case TypeKind::id:
0 commit comments