diff options
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r-- | llvm/lib/Support/CMakeLists.txt | 2 | ||||
-rw-r--r-- | llvm/lib/Support/DataStream.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/Support/StreamingMemoryObject.cpp (renamed from llvm/lib/Support/StreamableMemoryObject.cpp) | 12 |
3 files changed, 8 insertions, 10 deletions
diff --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt index 794372d172c..fa62591191d 100644 --- a/llvm/lib/Support/CMakeLists.txt +++ b/llvm/lib/Support/CMakeLists.txt @@ -80,7 +80,7 @@ add_llvm_library(LLVMSupport SourceMgr.cpp SpecialCaseList.cpp Statistic.cpp - StreamableMemoryObject.cpp + StreamingMemoryObject.cpp StringExtras.cpp StringMap.cpp StringPool.cpp diff --git a/llvm/lib/Support/DataStream.cpp b/llvm/lib/Support/DataStream.cpp index 32653de5194..dbf6465189d 100644 --- a/llvm/lib/Support/DataStream.cpp +++ b/llvm/lib/Support/DataStream.cpp @@ -32,12 +32,12 @@ using namespace llvm; #define DEBUG_TYPE "Data-stream" // Interface goals: -// * StreamableMemoryObject doesn't care about complexities like using +// * StreamingMemoryObject doesn't care about complexities like using // threads/async callbacks to actually overlap download+compile // * Don't want to duplicate Data in memory // * Don't need to know total Data len in advance // Non-goals: -// StreamableMemoryObject already has random access so this interface only does +// StreamingMemoryObject already has random access so this interface only does // in-order streaming (no arbitrary seeking, else we'd have to buffer all the // Data here in addition to MemoryObject). This also means that if we want // to be able to to free Data, BitstreamBytes/BitcodeReader will implement it diff --git a/llvm/lib/Support/StreamableMemoryObject.cpp b/llvm/lib/Support/StreamingMemoryObject.cpp index 1a11f5b0cde..7187ce013fa 100644 --- a/llvm/lib/Support/StreamableMemoryObject.cpp +++ b/llvm/lib/Support/StreamingMemoryObject.cpp @@ -1,4 +1,4 @@ -//===- StreamableMemoryObject.cpp - Streamable data interface -------------===// +//===- StreamingMemoryObject.cpp - Streamable data interface -------------===// // // The LLVM Compiler Infrastructure // @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// -#include "llvm/Support/StreamableMemoryObject.h" +#include "llvm/Support/StreamingMemoryObject.h" #include "llvm/Support/Compiler.h" #include <cassert> #include <cstddef> @@ -18,7 +18,7 @@ using namespace llvm; namespace { -class RawMemoryObject : public StreamableMemoryObject { +class RawMemoryObject : public MemoryObject { public: RawMemoryObject(const unsigned char *Start, const unsigned char *End) : FirstChar(Start), LastChar(End) { @@ -111,13 +111,11 @@ void StreamingMemoryObject::setKnownObjectSize(size_t size) { Bytes.reserve(size); } -StreamableMemoryObject *getNonStreamedMemoryObject( - const unsigned char *Start, const unsigned char *End) { +MemoryObject *getNonStreamedMemoryObject(const unsigned char *Start, + const unsigned char *End) { return new RawMemoryObject(Start, End); } -StreamableMemoryObject::~StreamableMemoryObject() { } - StreamingMemoryObject::StreamingMemoryObject(DataStreamer *streamer) : Bytes(kChunkSize), Streamer(streamer), BytesRead(0), BytesSkipped(0), ObjectSize(0), EOFReached(false) { |