[llvm] r322475 - [Support] Remove MemoryBuffer::getNewMemBuffer
Pavel Labath via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 15 03:03:31 PST 2018
Author: labath
Date: Mon Jan 15 03:03:30 2018
New Revision: 322475
URL: http://llvm.org/viewvc/llvm-project?rev=322475&view=rev
Log:
[Support] Remove MemoryBuffer::getNewMemBuffer
all callers have been switched the the Writable version (which does not
require const_casting to be useful).
Modified:
llvm/trunk/include/llvm/Support/MemoryBuffer.h
llvm/trunk/lib/Support/MemoryBuffer.cpp
Modified: llvm/trunk/include/llvm/Support/MemoryBuffer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/MemoryBuffer.h?rev=322475&r1=322474&r2=322475&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/MemoryBuffer.h (original)
+++ llvm/trunk/include/llvm/Support/MemoryBuffer.h Mon Jan 15 03:03:30 2018
@@ -117,11 +117,6 @@ public:
static std::unique_ptr<MemoryBuffer>
getMemBufferCopy(StringRef InputData, const Twine &BufferName = "");
- // TODO: Remove after all callers are switched to
- // WritableMemoryBuffer::getNewMemBuffer
- static std::unique_ptr<MemoryBuffer>
- getNewMemBuffer(size_t Size, StringRef BufferName = "");
-
/// Read all of stdin into a file buffer, and return it.
static ErrorOr<std::unique_ptr<MemoryBuffer>> getSTDIN();
Modified: llvm/trunk/lib/Support/MemoryBuffer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/MemoryBuffer.cpp?rev=322475&r1=322474&r2=322475&view=diff
==============================================================================
--- llvm/trunk/lib/Support/MemoryBuffer.cpp (original)
+++ llvm/trunk/lib/Support/MemoryBuffer.cpp Mon Jan 15 03:03:30 2018
@@ -139,11 +139,6 @@ MemoryBuffer::getMemBufferCopy(StringRef
return nullptr;
}
-std::unique_ptr<MemoryBuffer>
-MemoryBuffer::getNewMemBuffer(size_t Size, StringRef BufferName) {
- return WritableMemoryBuffer::getNewMemBuffer(Size, BufferName);
-}
-
ErrorOr<std::unique_ptr<MemoryBuffer>>
MemoryBuffer::getFileOrSTDIN(const Twine &Filename, int64_t FileSize,
bool RequiresNullTerminator) {
More information about the llvm-commits
mailing list