From 293e4bccae27d15c6600f2cdd00624305aa3b68f Mon Sep 17 00:00:00 2001 From: Andrey Shishpanov Date: Thu, 17 Sep 2015 14:38:42 +0300 Subject: [PATCH] replaced useless bitSize with explicit byteSize --- ispc.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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