From cc13c2cf4785d1e79896f66eca065953e59f23b4 Mon Sep 17 00:00:00 2001 From: Manuel Jacob Date: Fri, 22 Jan 2016 03:30:27 +0000 Subject: Replace Type::getInt32Ty() and comparison by isIntegerTy(32). NFC. llvm-svn: 258480 --- llvm/lib/IR/DataLayout.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'llvm/lib/IR/DataLayout.cpp') diff --git a/llvm/lib/IR/DataLayout.cpp b/llvm/lib/IR/DataLayout.cpp index de3dfb0754d..dd85a174f94 100644 --- a/llvm/lib/IR/DataLayout.cpp +++ b/llvm/lib/IR/DataLayout.cpp @@ -736,9 +736,7 @@ uint64_t DataLayout::getIndexedOffsetInType(Type *ElemTy, for (; GTI != GTE; ++GTI) { Value *Idx = GTI.getOperand(); if (StructType *STy = dyn_cast(*GTI)) { - assert(Idx->getType() == - Type::getInt32Ty(ElemTy->getContext()) && - "Illegal struct idx"); + assert(Idx->getType()->isIntegerTy(32) && "Illegal struct idx"); unsigned FieldNo = cast(Idx)->getZExtValue(); // Get structure layout information... -- cgit v1.2.3