summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/DataLayout.cpp
diff options
context:
space:
mode:
authorManuel Jacob <me@manueljacob.de>2016-01-22 03:30:27 +0000
committerManuel Jacob <me@manueljacob.de>2016-01-22 03:30:27 +0000
commitcc13c2cf4785d1e79896f66eca065953e59f23b4 (patch)
tree1ccb2c2246494588401d00f3aef10d74b9ab1944 /llvm/lib/IR/DataLayout.cpp
parentd84f74cab71c000637aba69a68d38fce7b1675c1 (diff)
downloadbcm5719-llvm-cc13c2cf4785d1e79896f66eca065953e59f23b4.tar.gz
bcm5719-llvm-cc13c2cf4785d1e79896f66eca065953e59f23b4.zip
Replace Type::getInt32Ty() and comparison by isIntegerTy(32). NFC.
llvm-svn: 258480
Diffstat (limited to 'llvm/lib/IR/DataLayout.cpp')
-rw-r--r--llvm/lib/IR/DataLayout.cpp4
1 files changed, 1 insertions, 3 deletions
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<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...
OpenPOWER on IntegriCloud