mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Return a std::unique_ptr to make the ownership explicit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215850 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9ea1ec3d14
commit
40ef1799b8
@ -38,9 +38,9 @@ public:
|
||||
/// Like MemoryBuffer::getMemBuffer() this function returns a pointer to an
|
||||
/// object that is owned by the caller. However, the caller does not take
|
||||
/// ownership of the underlying memory.
|
||||
MemoryBuffer *getMemBuffer() const {
|
||||
return MemoryBuffer::getMemBuffer(Buffer->getBuffer(),
|
||||
Buffer->getBufferIdentifier(), false);
|
||||
std::unique_ptr<MemoryBuffer> getMemBuffer() const {
|
||||
return std::unique_ptr<MemoryBuffer>(MemoryBuffer::getMemBuffer(
|
||||
Buffer->getBuffer(), Buffer->getBufferIdentifier(), false));
|
||||
}
|
||||
|
||||
const char *getBufferStart() const { return Buffer->getBufferStart(); }
|
||||
|
Loading…
Reference in New Issue
Block a user