diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 |
commit | 13cc256e404620c1de0cbcc4e43ce1e2dbbc4898 (patch) | |
tree | 2732d02d7d51218d6eed98ac7fcfc5b8794896b5 /lib/ARCMigrate/Transforms.cpp | |
parent | 657bc3d9848e3be92029b2416031340988cd0111 (diff) |
Notes
Diffstat (limited to 'lib/ARCMigrate/Transforms.cpp')
-rw-r--r-- | lib/ARCMigrate/Transforms.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ARCMigrate/Transforms.cpp b/lib/ARCMigrate/Transforms.cpp index 1175c363163be..805a67d9d1888 100644 --- a/lib/ARCMigrate/Transforms.cpp +++ b/lib/ARCMigrate/Transforms.cpp @@ -40,7 +40,7 @@ bool MigrationPass::CFBridgingFunctionsDefined() { bool trans::canApplyWeak(ASTContext &Ctx, QualType type, bool AllowOnUnknownClass) { - if (!Ctx.getLangOpts().ObjCRuntimeHasWeak) + if (!Ctx.getLangOpts().ObjCARCWeak) return false; QualType T = type; @@ -59,7 +59,7 @@ bool trans::canApplyWeak(ASTContext &Ctx, QualType type, return false; // id/NSObject is not safe for weak. if (!AllowOnUnknownClass && !Class->hasDefinition()) return false; // forward classes are not verifiable, therefore not safe. - if (Class->isArcWeakrefUnavailable()) + if (Class && Class->isArcWeakrefUnavailable()) return false; } |