mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-16 16:16:45 +00:00
micro optimization: isSizedDerivedType is only called with arrays, vectors and structs.
llvm-svn: 196604
This commit is contained in:
parent
c7180b55dc
commit
ce238ae45e
@ -156,18 +156,12 @@ int Type::getFPMantissaWidth() const {
|
||||
/// iff all of the members of the type are sized as well. Since asking for
|
||||
/// their size is relatively uncommon, move this operation out of line.
|
||||
bool Type::isSizedDerivedType() const {
|
||||
if (this->isIntegerTy())
|
||||
return true;
|
||||
|
||||
if (const ArrayType *ATy = dyn_cast<ArrayType>(this))
|
||||
return ATy->getElementType()->isSized();
|
||||
|
||||
if (const VectorType *VTy = dyn_cast<VectorType>(this))
|
||||
return VTy->getElementType()->isSized();
|
||||
|
||||
if (!this->isStructTy())
|
||||
return false;
|
||||
|
||||
return cast<StructType>(this)->isSized();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user