diff options
author | Lang Hames <lhames@gmail.com> | 2019-05-20 20:53:05 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2019-05-20 20:53:05 +0000 |
commit | 93d2bdda6bfe287de7825cfac9224dcfe051b1c5 (patch) | |
tree | 7b876090b9f6357dc81e5c09f63addfe0993e528 /llvm/lib/Support/Memory.cpp | |
parent | 52fa90a348c1bed5ecbcc0965c57d67e5ec45d5a (diff) | |
download | bcm5719-llvm-93d2bdda6bfe287de7825cfac9224dcfe051b1c5.tar.gz bcm5719-llvm-93d2bdda6bfe287de7825cfac9224dcfe051b1c5.zip |
[Support] Renamed member 'Size' to 'AllocatedSize' in MemoryBlock and OwningMemoryBlock.
Rename member 'Size' to 'AllocatedSize' in order to provide a hint that the
allocated size may be different than the requested size. Comments are added to
clarify this point. Updated the InMemoryBuffer in FileOutputBuffer.cpp to track
the requested buffer size.
Patch by Machiel van Hooren. Thanks Machiel!
https://reviews.llvm.org/D61599
llvm-svn: 361195
Diffstat (limited to 'llvm/lib/Support/Memory.cpp')
-rw-r--r-- | llvm/lib/Support/Memory.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/Memory.cpp b/llvm/lib/Support/Memory.cpp index 4a84247abf4..581484268cd 100644 --- a/llvm/lib/Support/Memory.cpp +++ b/llvm/lib/Support/Memory.cpp @@ -43,8 +43,8 @@ raw_ostream &operator<<(raw_ostream &OS, const Memory::ProtectionFlags &PF) { raw_ostream &operator<<(raw_ostream &OS, const MemoryBlock &MB) { return OS << "[ " << MB.base() << " .. " - << (void *)((char *)MB.base() + MB.size()) << " ] (" << MB.size() - << " bytes)"; + << (void *)((char *)MB.base() + MB.allocatedSize()) << " ] (" + << MB.allocatedSize() << " bytes)"; } } // end namespace sys |