mirror of
https://github.com/intel/llvm.git
synced 2026-01-18 07:57:36 +08:00
This commit is the result of a general audit of
the expression parser to locate instances where dyn_cast<>() and isa<>() are used on types, and replace them with getAs<>() as appropriate. The difference is that dyn_cast<>() and isa<>() are essentially LLVM/Clang's equivalent of RTTI -- that is, they try to downcast the object and return NULL if they cannot -- but getAs<>() can traverse typedefs to perform a semantic cast. llvm-svn: 146537
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user