diff --git a/ispc.cpp b/ispc.cpp index 5438a4e4..b9e5b821 100644 --- a/ispc.cpp +++ b/ispc.cpp @@ -1344,10 +1344,7 @@ Target::SizeOf(llvm::Type *type, "sizeof_int", insertAtEnd); } - uint64_t bitSize = getDataLayout()->getTypeSizeInBits(type); - - Assert((bitSize % 8) == 0); - uint64_t byteSize = bitSize / 8; + uint64_t byteSize = getDataLayout()->getTypeStoreSize(type); if (m_is32Bit || g->opt.force32BitAddressing) return LLVMInt32((int32_t)byteSize); else