From e04f8ab3fbd111a407a0460649b21ba803dfbd64 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Mon, 15 Jan 2018 11:03:30 +0000 Subject: [PATCH] [Support] Remove MemoryBuffer::getNewMemBuffer all callers have been switched the the Writable version (which does not require const_casting to be useful). llvm-svn: 322475 --- llvm/include/llvm/Support/MemoryBuffer.h | 5 ----- llvm/lib/Support/MemoryBuffer.cpp | 5 ----- 2 files changed, 10 deletions(-) diff --git a/llvm/include/llvm/Support/MemoryBuffer.h b/llvm/include/llvm/Support/MemoryBuffer.h index 2534cf3eb658..9e13715fd9a2 100644 --- a/llvm/include/llvm/Support/MemoryBuffer.h +++ b/llvm/include/llvm/Support/MemoryBuffer.h @@ -117,11 +117,6 @@ public: static std::unique_ptr getMemBufferCopy(StringRef InputData, const Twine &BufferName = ""); - // TODO: Remove after all callers are switched to - // WritableMemoryBuffer::getNewMemBuffer - static std::unique_ptr - getNewMemBuffer(size_t Size, StringRef BufferName = ""); - /// Read all of stdin into a file buffer, and return it. static ErrorOr> getSTDIN(); diff --git a/llvm/lib/Support/MemoryBuffer.cpp b/llvm/lib/Support/MemoryBuffer.cpp index 834ca8cbfd8a..9cea9a281074 100644 --- a/llvm/lib/Support/MemoryBuffer.cpp +++ b/llvm/lib/Support/MemoryBuffer.cpp @@ -139,11 +139,6 @@ MemoryBuffer::getMemBufferCopy(StringRef InputData, const Twine &BufferName) { return nullptr; } -std::unique_ptr -MemoryBuffer::getNewMemBuffer(size_t Size, StringRef BufferName) { - return WritableMemoryBuffer::getNewMemBuffer(Size, BufferName); -} - ErrorOr> MemoryBuffer::getFileOrSTDIN(const Twine &Filename, int64_t FileSize, bool RequiresNullTerminator) {