@@ -447,10 +447,9 @@ class LowerTypeTestsModule {
447
447
448
448
IntegerType *Int1Ty = Type::getInt1Ty(M.getContext());
449
449
IntegerType *Int8Ty = Type::getInt8Ty(M.getContext());
450
- PointerType *Int8PtrTy = PointerType::getUnqual(M.getContext());
450
+ PointerType *PtrTy = PointerType::getUnqual(M.getContext());
451
451
ArrayType *Int8Arr0Ty = ArrayType::get(Type::getInt8Ty(M.getContext()), 0 );
452
452
IntegerType *Int32Ty = Type::getInt32Ty(M.getContext());
453
- PointerType *Int32PtrTy = PointerType::getUnqual(M.getContext());
454
453
IntegerType *Int64Ty = Type::getInt64Ty(M.getContext());
455
454
IntegerType *IntPtrTy = M.getDataLayout().getIntPtrType(M.getContext(), 0 );
456
455
@@ -654,7 +653,7 @@ void LowerTypeTestsModule::allocateByteArrays() {
654
653
BAB.allocate (BAI->Bits , BAI->BitSize , ByteArrayOffsets[I], Mask);
655
654
656
655
BAI->MaskGlobal ->replaceAllUsesWith (
657
- ConstantExpr::getIntToPtr (ConstantInt::get (Int8Ty, Mask), Int8PtrTy ));
656
+ ConstantExpr::getIntToPtr (ConstantInt::get (Int8Ty, Mask), PtrTy ));
658
657
BAI->MaskGlobal ->eraseFromParent ();
659
658
if (BAI->MaskPtr )
660
659
*BAI->MaskPtr = Mask;
@@ -948,7 +947,7 @@ uint8_t *LowerTypeTestsModule::exportTypeId(StringRef TypeId,
948
947
949
948
auto ExportConstant = [&](StringRef Name, uint64_t &Storage, Constant *C) {
950
949
if (shouldExportConstantsAsAbsoluteSymbols ())
951
- ExportGlobal (Name, ConstantExpr::getIntToPtr (C, Int8PtrTy ));
950
+ ExportGlobal (Name, ConstantExpr::getIntToPtr (C, PtrTy ));
952
951
else
953
952
Storage = cast<ConstantInt>(C)->getZExtValue ();
954
953
};
@@ -1046,7 +1045,7 @@ LowerTypeTestsModule::importTypeId(StringRef TypeId) {
1046
1045
1047
1046
if (TIL.TheKind == TypeTestResolution::ByteArray) {
1048
1047
TIL.TheByteArray = ImportGlobal (" byte_array" );
1049
- TIL.BitMask = ImportConstant (" bit_mask" , TTRes.BitMask , 8 , Int8PtrTy );
1048
+ TIL.BitMask = ImportConstant (" bit_mask" , TTRes.BitMask , 8 , PtrTy );
1050
1049
}
1051
1050
1052
1051
if (TIL.TheKind == TypeTestResolution::Inline)
@@ -1778,7 +1777,7 @@ void LowerTypeTestsModule::buildBitSetsFromFunctionsWASM(
1778
1777
1779
1778
// The indirect function table index space starts at zero, so pass a NULL
1780
1779
// pointer as the subtracted "jump table" offset.
1781
- lowerTypeTestCalls (TypeIds, ConstantPointerNull::get (Int32PtrTy ),
1780
+ lowerTypeTestCalls (TypeIds, ConstantPointerNull::get (PtrTy ),
1782
1781
GlobalLayout);
1783
1782
}
1784
1783
0 commit comments