From: Matt Arsenault Date: Sat, 27 Jul 2013 19:22:28 +0000 (+0000) Subject: Minor code simplification suggested by Duncan X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=fe655dc15598ebd4c8077e4a67914e7f233e0774;p=oota-llvm.git Minor code simplification suggested by Duncan git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187309 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/IR/DataLayout.cpp b/lib/IR/DataLayout.cpp index d1096d74242..d786d33f9ca 100644 --- a/lib/IR/DataLayout.cpp +++ b/lib/IR/DataLayout.cpp @@ -514,8 +514,7 @@ unsigned DataLayout::getPointerTypeSizeInBits(Type *Ty) const { if (Ty->isPointerTy()) return getTypeSizeInBits(Ty); - Type *EleTy = cast(Ty)->getElementType(); - return getTypeSizeInBits(EleTy); + return getTypeSizeInBits(Ty->getScalarType()); } /*!