LLVM
3.7.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
work
release_test
rc4
llvm.src
include
llvm
Support
DataStream.h
Go to the documentation of this file.
1
//===---- llvm/Support/DataStream.h - Lazy bitcode streaming ----*- C++ -*-===//
2
//
3
// The LLVM Compiler Infrastructure
4
//
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
7
//
8
//===----------------------------------------------------------------------===//
9
//
10
// This header defines DataStreamer, which fetches bytes of data from
11
// a stream source. It provides support for streaming (lazy reading) of
12
// data, e.g. bitcode
13
//
14
//===----------------------------------------------------------------------===//
15
16
17
#ifndef LLVM_SUPPORT_DATASTREAM_H
18
#define LLVM_SUPPORT_DATASTREAM_H
19
20
#include <memory>
21
#include <string>
22
23
namespace
llvm {
24
25
class
DataStreamer
{
26
public
:
27
/// Fetch bytes [start-end) from the stream, and write them to the
28
/// buffer pointed to by buf. Returns the number of bytes actually written.
29
virtual
size_t
GetBytes
(
unsigned
char
*buf,
size_t
len) = 0;
30
31
virtual
~DataStreamer
();
32
};
33
34
std::unique_ptr<DataStreamer>
getDataFileStreamer
(
const
std::string &Filename,
35
std::string *Err);
36
}
37
38
#endif // LLVM_SUPPORT_DATASTREAM_H_
llvm::DataStreamer::GetBytes
virtual size_t GetBytes(unsigned char *buf, size_t len)=0
Fetch bytes [start-end) from the stream, and write them to the buffer pointed to by buf...
llvm::DataStreamer::~DataStreamer
virtual ~DataStreamer()
Definition:
DataStream.cpp:47
llvm::getDataFileStreamer
std::unique_ptr< DataStreamer > getDataFileStreamer(const std::string &Filename, std::string *Err)
Definition:
DataStream.cpp:78
llvm::DataStreamer
Definition:
DataStream.h:25
Generated on Mon Aug 31 2015 11:00:11 for LLVM by
1.8.6