This repository was archived by the owner on Apr 2, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -433,7 +433,7 @@ CachedMemberInfo *SwiftASTContext::GetCachedMemberInfo(void *type) {
433
433
}
434
434
435
435
for (auto decl : nominal_decl->getMembers ()) {
436
- if (decl-> getKind () == swift::DeclKind::Var ) {
436
+ if (swift::isa<swift::VarDecl>(decl) ) {
437
437
swift::VarDecl *var_decl = llvm::cast<swift::VarDecl>(decl);
438
438
if (var_decl->hasStorage () && !var_decl->isStatic ()) {
439
439
MemberInfo member_info (MemberType::Field);
@@ -494,7 +494,7 @@ CachedMemberInfo *SwiftASTContext::GetCachedMemberInfo(void *type) {
494
494
495
495
for (auto decl : t_decl->getMembers ()) {
496
496
// Find ivars that aren't properties
497
- if (decl-> getKind () == swift::DeclKind::Var ) {
497
+ if (swift::isa<swift::VarDecl>(decl) ) {
498
498
swift::VarDecl *var_decl = llvm::cast<swift::VarDecl>(decl);
499
499
if (var_decl->hasStorage () && !var_decl->isStatic ()) {
500
500
MemberInfo member_info (MemberType::Field);
@@ -4008,13 +4008,7 @@ ConstString SwiftASTContext::GetMangledTypeName(swift::TypeBase *type_base) {
4008
4008
4009
4009
swift::Type swift_type (type_base);
4010
4010
4011
- bool has_archetypes = false ;
4012
-
4013
- swift_type.visit ([&has_archetypes](swift::Type part_type) -> void {
4014
- if (part_type->getKind () == swift::TypeKind::Archetype) {
4015
- has_archetypes = true ;
4016
- }
4017
- });
4011
+ bool has_archetypes = swift_type->hasArchetype ();
4018
4012
4019
4013
if (!has_archetypes) {
4020
4014
swift::Mangle::Mangler mangler (true );
You can’t perform that action at this time.
0 commit comments