Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.1 KiB

  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. #ifndef LLVM_SUPPORT_DATASTREAM_H
  16. #define LLVM_SUPPORT_DATASTREAM_H
  17. #include <string>
  18. namespace llvm {
  19. class DataStreamer {
  20. public:
  21. /// Fetch bytes [start-end) from the stream, and write them to the
  22. /// buffer pointed to by buf. Returns the number of bytes actually written.
  23. virtual size_t GetBytes(unsigned char *buf, size_t len) = 0;
  24. virtual ~DataStreamer();
  25. };
  26. DataStreamer *getDataFileStreamer(const std::string &Filename,
  27. std::string *Err);
  28. }
  29. #endif // LLVM_SUPPORT_DATASTREAM_H_