diff --git a/lldb/source/Plugins/ExpressionParser/Swift/SwiftExpressionParser.cpp b/lldb/source/Plugins/ExpressionParser/Swift/SwiftExpressionParser.cpp index cd42b0a3da8fd..ffe29575157f0 100644 --- a/lldb/source/Plugins/ExpressionParser/Swift/SwiftExpressionParser.cpp +++ b/lldb/source/Plugins/ExpressionParser/Swift/SwiftExpressionParser.cpp @@ -687,8 +687,8 @@ AddRequiredAliases(Block *block, lldb::StackFrameSP &stack_frame_sp, swift::Type first_arg_type = optional_type->getGenericArgs()[0]; // In Swift only class types can be weakly captured. - if (!llvm::isa(first_arg_type) && - !llvm::isa(first_arg_type)) + if (!first_arg_type->is() && + !first_arg_type->is()) return llvm::createStringError( "Unable to add the aliases the expression needs because " "weakly captured type is not a class type."); diff --git a/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp b/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp index 73179233d8b76..bb5f105b24921 100644 --- a/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp +++ b/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp @@ -5450,7 +5450,7 @@ bool SwiftASTContext::IsTupleType(lldb::opaque_compiler_type_t type) { VALID_OR_RETURN(false); auto swift_type = GetSwiftType(type); - return llvm::isa<::swift::TupleType>(swift_type); + return swift_type->is(); } std::optional @@ -6060,8 +6060,7 @@ SwiftASTContext::GetStaticSelfType(lldb::opaque_compiler_type_t type) { VALID_OR_RETURN_CHECK_TYPE(type, CompilerType()); swift::Type swift_type = GetSwiftType(type); - if (auto *dyn_self = - llvm::dyn_cast_or_null(swift_type)) + if (auto *dyn_self = swift_type->getAs()) return ToCompilerType({dyn_self->getSelfType().getPointer()}); return {weak_from_this(), type}; }