diff options
author | Reid Kleckner <reid@kleckner.net> | 2009-07-23 01:40:54 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2009-07-23 01:40:54 +0000 |
commit | 4bf370698a456bcc96d26184785eb4f5fab396f2 (patch) | |
tree | 30f156c6f9fbe2faa7faf0dbbf047dd053dd1d23 /include/llvm/System/Memory.h | |
parent | 54e650f2c7bfcaec159ae41b2d79ce4a9a45edf8 (diff) |
Reverting r76825 and r76828, since they caused clang runtime errors and some build failure involving memset.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76838 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/System/Memory.h')
-rw-r--r-- | include/llvm/System/Memory.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/include/llvm/System/Memory.h b/include/llvm/System/Memory.h index d6300db5a9..136dc8a328 100644 --- a/include/llvm/System/Memory.h +++ b/include/llvm/System/Memory.h @@ -14,7 +14,6 @@ #ifndef LLVM_SYSTEM_MEMORY_H #define LLVM_SYSTEM_MEMORY_H -#include "llvm/Support/DataTypes.h" #include <string> namespace llvm { @@ -27,13 +26,11 @@ namespace sys { /// @brief Memory block abstraction. class MemoryBlock { public: - MemoryBlock() { } - MemoryBlock(void *addr, size_t size) : Address(addr), Size(size) { } void *base() const { return Address; } - size_t size() const { return Size; } + unsigned size() const { return Size; } private: void *Address; ///< Address of first byte of memory area - size_t Size; ///< Size, in bytes of the memory area + unsigned Size; ///< Size, in bytes of the memory area friend class Memory; }; @@ -53,7 +50,7 @@ namespace sys { /// a null memory block and fills in *ErrMsg. /// /// @brief Allocate Read/Write/Execute memory. - static MemoryBlock AllocateRWX(size_t NumBytes, + static MemoryBlock AllocateRWX(unsigned NumBytes, const MemoryBlock *NearBlock, std::string *ErrMsg = 0); |