replaced useless bitSize with explicit byteSize
This commit is contained in:
5
ispc.cpp
5
ispc.cpp
@@ -1344,10 +1344,7 @@ Target::SizeOf(llvm::Type *type,
|
|||||||
"sizeof_int", insertAtEnd);
|
"sizeof_int", insertAtEnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t bitSize = getDataLayout()->getTypeSizeInBits(type);
|
uint64_t byteSize = getDataLayout()->getTypeStoreSize(type);
|
||||||
|
|
||||||
Assert((bitSize % 8) == 0);
|
|
||||||
uint64_t byteSize = bitSize / 8;
|
|
||||||
if (m_is32Bit || g->opt.force32BitAddressing)
|
if (m_is32Bit || g->opt.force32BitAddressing)
|
||||||
return LLVMInt32((int32_t)byteSize);
|
return LLVMInt32((int32_t)byteSize);
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user