diff options
-rw-r--r-- | include/llvm/CodeGen/ValueTypes.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/ValueTypes.h b/include/llvm/CodeGen/ValueTypes.h index 167a70e..1f0dd21 100644 --- a/include/llvm/CodeGen/ValueTypes.h +++ b/include/llvm/CodeGen/ValueTypes.h @@ -552,10 +552,16 @@ namespace llvm { return getExtendedSizeInBits(); } + /// getStoreSize - Return the number of bytes overwritten by a store + /// of the specified value type. + unsigned getStoreSize() const { + return (getSizeInBits() + 7) / 8; + } + /// getStoreSizeInBits - Return the number of bits overwritten by a store /// of the specified value type. unsigned getStoreSizeInBits() const { - return (getSizeInBits() + 7)/8*8; + return getStoreSize() * 8; } /// getRoundIntegerType - Rounds the bit-width of the given integer EVT up |