OLD | NEW |
(Empty) | |
| 1 //===---- llvm/Bitcode/BitcodeStream.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 BitcodeStreamer, which fetches bytes of bitcode from |
| 11 // a stream source. It provides support for streaming (lazy reading) of |
| 12 // bitcode. |
| 13 // |
| 14 //===----------------------------------------------------------------------===// |
| 15 |
| 16 |
| 17 #ifndef LLVM_SUPPORT_BITCODESTREAM_H_ |
| 18 #define LLVM_SUPPORT_BITCODESTREAM_H_ |
| 19 |
| 20 #include <string> |
| 21 |
| 22 namespace llvm { |
| 23 class MemoryBuffer; |
| 24 |
| 25 class BitcodeStreamer { |
| 26 public: |
| 27 /// Fetch bytes [start-end) from the bitcode 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 ~BitcodeStreamer(); |
| 32 }; |
| 33 |
| 34 BitcodeStreamer *getBitcodeFileStreamer(const std::string &Filename, |
| 35 std::string *Err); |
| 36 |
| 37 } |
| 38 |
| 39 #endif // LLVM_SUPPORT_BITCODESTREAM_H_ |
OLD | NEW |