diff options
-rw-r--r-- | lldb/source/Expression/ASTResultSynthesizer.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Expression/ClangASTSource.cpp | 12 | ||||
-rw-r--r-- | lldb/source/Expression/ClangUserExpression.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Expression/IRForTarget.cpp | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/lldb/source/Expression/ASTResultSynthesizer.cpp b/lldb/source/Expression/ASTResultSynthesizer.cpp index 6e2551cf1d5..0df2a5ec690 100644 --- a/lldb/source/Expression/ASTResultSynthesizer.cpp +++ b/lldb/source/Expression/ASTResultSynthesizer.cpp @@ -333,7 +333,7 @@ ASTResultSynthesizer::SynthesizeBodyResult (CompoundStmt *Body, QualType ptr_qual_type; - if (isa<ObjCObjectType>(expr_qual_type)) + if (expr_qual_type->getAs<ObjCObjectType>() != NULL) ptr_qual_type = Ctx.getObjCObjectPointerType(expr_qual_type); else ptr_qual_type = Ctx.getPointerType(expr_qual_type); diff --git a/lldb/source/Expression/ClangASTSource.cpp b/lldb/source/Expression/ClangASTSource.cpp index 9831070c9be..1f84185042a 100644 --- a/lldb/source/Expression/ClangASTSource.cpp +++ b/lldb/source/Expression/ClangASTSource.cpp @@ -220,7 +220,7 @@ ClangASTSource::CompleteType (TagDecl *tag_decl) if (!opaque_type) continue; - const TagType *tag_type = dyn_cast<TagType>(QualType::getFromOpaquePtr(opaque_type).getTypePtr()); + const TagType *tag_type = QualType::getFromOpaquePtr(opaque_type)->getAs<TagType>(); if (!tag_type) continue; @@ -258,7 +258,7 @@ ClangASTSource::CompleteType (TagDecl *tag_decl) if (!opaque_type) continue; - const TagType *tag_type = dyn_cast<TagType>(QualType::getFromOpaquePtr(opaque_type).getTypePtr()); + const TagType *tag_type = QualType::getFromOpaquePtr(opaque_type)->getAs<TagType>(); if (!tag_type) continue; @@ -677,7 +677,7 @@ ClangASTSource::FindObjCMethodDecls (NameSearchContext &context) QualType backing_qual_type = QualType::getFromOpaquePtr(backing_type); - const ObjCInterfaceType *backing_interface_type = dyn_cast<ObjCInterfaceType>(backing_qual_type.getTypePtr()); + const ObjCInterfaceType *backing_interface_type = backing_qual_type.getTypePtr()->getAs<ObjCInterfaceType>(); if (!backing_interface_type) continue; @@ -1067,7 +1067,7 @@ NameSearchContext::AddFunDecl (void *type) // this, we raid the function's FunctionProtoType for types. QualType qual_type (QualType::getFromOpaquePtr(type)); - const FunctionProtoType *func_proto_type = dyn_cast<FunctionProtoType>(qual_type.getTypePtr()); + const FunctionProtoType *func_proto_type = qual_type.getTypePtr()->getAs<FunctionProtoType>(); if (func_proto_type) { @@ -1128,7 +1128,7 @@ NameSearchContext::AddTypeDecl(void *type) { QualType qual_type = QualType::getFromOpaquePtr(type); - if (const TagType *tag_type = dyn_cast<clang::TagType>(qual_type)) + if (const TagType *tag_type = qual_type->getAs<TagType>()) { TagDecl *tag_decl = tag_type->getDecl(); @@ -1136,7 +1136,7 @@ NameSearchContext::AddTypeDecl(void *type) return tag_decl; } - else if (const ObjCObjectType *objc_object_type = dyn_cast<clang::ObjCObjectType>(qual_type)) + else if (const ObjCObjectType *objc_object_type = qual_type->getAs<ObjCObjectType>()) { ObjCInterfaceDecl *interface_decl = objc_object_type->getInterface(); diff --git a/lldb/source/Expression/ClangUserExpression.cpp b/lldb/source/Expression/ClangUserExpression.cpp index e749d027bf7..8f011c089d9 100644 --- a/lldb/source/Expression/ClangUserExpression.cpp +++ b/lldb/source/Expression/ClangUserExpression.cpp @@ -160,7 +160,7 @@ ClangUserExpression::ScanContext(ExecutionContext &exe_ctx, Error &err) do { clang::QualType this_type = method_decl->getThisType(decl_context->getParentASTContext()); - const clang::PointerType *this_pointer_type = llvm::dyn_cast<clang::PointerType>(this_type.getTypePtr()); + const clang::PointerType *this_pointer_type = this_type->getAs<clang::PointerType>(); if (!this_pointer_type) break; diff --git a/lldb/source/Expression/IRForTarget.cpp b/lldb/source/Expression/IRForTarget.cpp index 3722f34bd5d..258953ac597 100644 --- a/lldb/source/Expression/IRForTarget.cpp +++ b/lldb/source/Expression/IRForTarget.cpp @@ -632,8 +632,8 @@ IRForTarget::CreateResultVariable (llvm::Function &llvm_function) clang::QualType pointer_qual_type = result_var->getType(); const clang::Type *pointer_type = pointer_qual_type.getTypePtr(); - const clang::PointerType *pointer_pointertype = dyn_cast<clang::PointerType>(pointer_type); - const clang::ObjCObjectPointerType *pointer_objcobjpointertype = dyn_cast<clang::ObjCObjectPointerType>(pointer_type); + const clang::PointerType *pointer_pointertype = pointer_type->getAs<clang::PointerType>(); + const clang::ObjCObjectPointerType *pointer_objcobjpointertype = pointer_type->getAs<clang::ObjCObjectPointerType>(); if (pointer_pointertype) { |