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.
1 parent b08a6f5 commit ae8a506Copy full SHA for ae8a506
lib/AST/Type.cpp
@@ -4012,9 +4012,12 @@ ReferenceCounting TypeBase::getReferenceCounting() {
4012
ASTContext &ctx = type->getASTContext();
4013
4014
// In the absence of Objective-C interoperability, everything uses native
4015
- // reference counting.
4016
- if (!ctx.LangOpts.EnableObjCInterop)
4017
- return ReferenceCounting::Native;
+ // reference counting or is the builtin BridgeObject.
+ if (!ctx.LangOpts.EnableObjCInterop) {
+ return type->getKind() == TypeKind::BuiltinBridgeObject
4018
+ ? ReferenceCounting::Bridge
4019
+ : ReferenceCounting::Native;
4020
+ }
4021
4022
switch (type->getKind()) {
4023
#define SUGARED_TYPE(id, parent) case TypeKind::id:
0 commit comments