replaced useless bitSize with explicit byteSize

This commit is contained in:
Andrey Shishpanov
2015-09-17 14:38:42 +03:00
parent f9cccad370
commit 293e4bccae

View File

@@ -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