зеркало из https://github.com/microsoft/clang.git
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
This commit is contained in:
Родитель
8c4bfe52e5
Коммит
e6012c7ecb
|
@ -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!");
|
||||
}
|
||||
|
||||
|
|
|
@ -50,3 +50,15 @@ class Int3 { int x, y, z; };
|
|||
- (void) foo: (int (Int3::*)) member {
|
||||
}
|
||||
@end
|
||||
|
||||
// rdar: // 8519948
|
||||
typedef float HGVec4f __attribute__ ((vector_size(16)));
|
||||
|
||||
@interface RedBalloonHGXFormWrapper {
|
||||
HGVec4f m_Transform[4];
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation RedBalloonHGXFormWrapper
|
||||
@end
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче