summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2015-02-11 00:04:33 +0000
committerGreg Clayton <gclayton@apple.com>2015-02-11 00:04:33 +0000
commite3c65509cde13b4647d9cb8c01d11c8808ab9de3 (patch)
treed9c8490d3cb4bfc2774fd2f765144f1a51461a99
parent78d1c3fcb6f97f8297245b90c855e46186226c14 (diff)
downloadbcm5719-llvm-e3c65509cde13b4647d9cb8c01d11c8808ab9de3.tar.gz
bcm5719-llvm-e3c65509cde13b4647d9cb8c01d11c8808ab9de3.zip
Fixed a crasher that could happen if:
- you have a type that contains a typedef to a VectorType or an ExtVectorType - that type is returned from an ARM function that LLDB steps over so we try to figure out the return type - we try to determine if the type is a homogeneous aggregate type and we crash We get not using getAs() when we should have been and using llvm::cast caused an assertion crash when the typedef type didn't return a valid VectorType or ExtVectorType. <rdar://problem/19646550> llvm-svn: 228771
-rw-r--r--lldb/source/Symbol/ClangASTType.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Symbol/ClangASTType.cpp b/lldb/source/Symbol/ClangASTType.cpp
index eaff90ab8a0..8e3d7bd7292 100644
--- a/lldb/source/Symbol/ClangASTType.cpp
+++ b/lldb/source/Symbol/ClangASTType.cpp
@@ -493,7 +493,7 @@ ClangASTType::IsHomogeneousAggregate (ClangASTType* base_type_ptr) const
}
else if (field_qual_type->isVectorType() || field_qual_type->isExtVectorType())
{
- const clang::VectorType *array = llvm::cast<clang::VectorType>(field_qual_type.getTypePtr());
+ const clang::VectorType *array = field_qual_type.getTypePtr()->getAs<clang::VectorType>();
if (array && array->getNumElements() <= 4)
{
if (num_fields == 0)
OpenPOWER on IntegriCloud