Replace Type::getInt32Ty() and comparison by isIntegerTy(32). NFC.

llvm-svn: 258480
This commit is contained in:
Manuel Jacob 2016-01-22 03:30:27 +00:00
parent d84f74cab7
commit cc13c2cf47
1 changed files with 1 additions and 3 deletions

View File

@ -736,9 +736,7 @@ uint64_t DataLayout::getIndexedOffsetInType(Type *ElemTy,
for (; GTI != GTE; ++GTI) {
Value *Idx = GTI.getOperand();
if (StructType *STy = dyn_cast<StructType>(*GTI)) {
assert(Idx->getType() ==
Type::getInt32Ty(ElemTy->getContext()) &&
"Illegal struct idx");
assert(Idx->getType()->isIntegerTy(32) && "Illegal struct idx");
unsigned FieldNo = cast<ConstantInt>(Idx)->getZExtValue();
// Get structure layout information...