1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00

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 7b4522dc59
commit 714fa41ac7

View File

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