forked from OSchip/llvm-project
parent
d2aac5795e
commit
e122ee1fab
|
@ -1432,11 +1432,14 @@ bool ASTContext::isAlignmentRequired(QualType T) const {
|
|||
}
|
||||
|
||||
TypeInfo ASTContext::getTypeInfo(const Type *T) const {
|
||||
TypeInfo &TI = MemoizedTypeInfo[T];
|
||||
if (!TI.Align)
|
||||
TI = getTypeInfoImpl(T);
|
||||
TypeInfo TI = MemoizedTypeInfo[T];
|
||||
if (TI.Align)
|
||||
return TI;
|
||||
|
||||
return TI;
|
||||
// This call can invalidate TI, so we need a second lookup.
|
||||
TypeInfo Temp = getTypeInfoImpl(T);
|
||||
MemoizedTypeInfo[T] = Temp;
|
||||
return Temp;
|
||||
}
|
||||
|
||||
/// getTypeInfoImpl - Return the size of the specified type, in bits. This
|
||||
|
|
Loading…
Reference in New Issue