Skip to content

Commit 89a8103

Browse files
committed
[AliasAnalysis] Minor cleanup.
1 parent 651edbf commit 89a8103

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

lib/SILAnalysis/AliasAnalysis.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -531,13 +531,14 @@ static bool typedAccessTBAAMayAlias(SILType LTy, SILType RTy, SILModule &Mod) {
531531
ClassDecl *LTyClass = LTy.getClassOrBoundGenericClass();
532532

533533
// The Builtin reference types can alias any class instance.
534-
if (RTy.is<BuiltinUnknownObjectType>() && LTyClass)
535-
return true;
536-
if (RTy.is<BuiltinNativeObjectType>() && LTyClass)
537-
return true;
538-
if (RTy.is<BuiltinBridgeObjectType>() && LTyClass)
539-
return true;
540-
534+
if (LTyClass) {
535+
if (RTy.is<BuiltinUnknownObjectType>() ||
536+
RTy.is<BuiltinNativeObjectType>() ||
537+
RTy.is<BuiltinBridgeObjectType>()) {
538+
return true;
539+
}
540+
}
541+
541542
// If one type is an aggregate and it contains the other type then the record
542543
// reference may alias the aggregate reference.
543544
if (LTy.aggregateContainsRecord(RTy, Mod) ||

0 commit comments

Comments
 (0)