diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-10-07 21:25:25 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-10-07 21:25:25 +0000 |
commit | e6012c7ecb9d848f4091c8c48e7d9946cc36b23f (patch) | |
tree | a086400a3f0f5121f8a2e23db9a32da9bd3f8c88 /lib/AST/ASTContext.cpp | |
parent | 8c4bfe52e528d6c9810cfb0c59859bca9ddc41f0 (diff) |
Fix a crash encoding ivars of vector types and
to match gcc's encoding. Fixes //rdar: // 8519948.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115980 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r-- | lib/AST/ASTContext.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index cf75474a19..0e549dddcd 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -3894,7 +3894,7 @@ void ASTContext::getObjCEncodingForTypeImpl(QualType T, std::string& S, S += RDecl->isUnion() ? ')' : '}'; return; } - + if (T->isEnumeralType()) { if (FD && FD->isBitField()) EncodeBitField(this, S, T, FD); @@ -3997,7 +3997,14 @@ void ASTContext::getObjCEncodingForTypeImpl(QualType T, std::string& S, // TODO: maybe there should be a mangling for these if (T->getAs<MemberPointerType>()) return; - + + if (T->isVectorType()) { + // This matches gcc's encoding, even though technically it is + // insufficient. + // FIXME. We should do a better job than gcc. + return; + } + assert(0 && "@encode for type not implemented!"); } |