summaryrefslogtreecommitdiff
path: root/lib/IR
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-12-06 20:12:19 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-12-06 20:12:19 +0000
commit3221b5bd23ed14b381b29652b1756ef7e40e7f02 (patch)
tree7fb9af5679ab4abca6911c087c0794ed3f044315 /lib/IR
parent08e03ce70fc39005971fc956476dfd99c75ad4b9 (diff)
downloadllvm-3221b5bd23ed14b381b29652b1756ef7e40e7f02.tar.gz
llvm-3221b5bd23ed14b381b29652b1756ef7e40e7f02.tar.bz2
llvm-3221b5bd23ed14b381b29652b1756ef7e40e7f02.tar.xz
micro optimization: isSizedDerivedType is only called with arrays, vectors and structs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196604 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR')
-rw-r--r--lib/IR/Type.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/IR/Type.cpp b/lib/IR/Type.cpp
index 432cbc99f5..03b1122e9e 100644
--- a/lib/IR/Type.cpp
+++ b/lib/IR/Type.cpp
@@ -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();
}