From a760b7e1d32d9f962a167fb1ee519ba797065329 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Fri, 26 Jan 2007 07:51:36 +0000 Subject: [PATCH] IntegerType is a sized DerivedType too. llvm-svn: 33521 --- llvm/lib/VMCore/Type.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llvm/lib/VMCore/Type.cpp b/llvm/lib/VMCore/Type.cpp index d1cdc5fe2efd..ec7aee803117 100644 --- a/llvm/lib/VMCore/Type.cpp +++ b/llvm/lib/VMCore/Type.cpp @@ -139,6 +139,9 @@ unsigned Type::getPrimitiveSizeInBits() 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 (isa(this)) + return true; + if (const ArrayType *ATy = dyn_cast(this)) return ATy->getElementType()->isSized(); -- GitLab