Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(671)

Unified Diff: pnacl-llvm/include/llvm/Support/DataStream.h

Issue 2605653002: Subzero: Fix build problem against LLVM trunk. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pnacl-llvm/StreamingMemoryObject.cpp ('k') | pnacl-llvm/include/llvm/Support/MemoryObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pnacl-llvm/include/llvm/Support/DataStream.h
diff --git a/pnacl-llvm/include/llvm/Support/DataStream.h b/pnacl-llvm/include/llvm/Support/DataStream.h
new file mode 100644
index 0000000000000000000000000000000000000000..a544316f430d83d1be7a63c0ab87cd953af29ed4
--- /dev/null
+++ b/pnacl-llvm/include/llvm/Support/DataStream.h
@@ -0,0 +1,38 @@
+//===---- llvm/Support/DataStream.h - Lazy bitcode streaming ----*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This header defines DataStreamer, which fetches bytes of data from
+// a stream source. It provides support for streaming (lazy reading) of
+// data, e.g. bitcode
+//
+//===----------------------------------------------------------------------===//
+
+
+#ifndef LLVM_SUPPORT_DATASTREAM_H
+#define LLVM_SUPPORT_DATASTREAM_H
+
+#include <memory>
+#include <string>
+
+namespace llvm {
+
+class DataStreamer {
+public:
+ /// Fetch bytes [start-end) from the stream, and write them to the
+ /// buffer pointed to by buf. Returns the number of bytes actually written.
+ virtual size_t GetBytes(unsigned char *buf, size_t len) = 0;
+
+ virtual ~DataStreamer();
+};
+
+std::unique_ptr<DataStreamer> getDataFileStreamer(const std::string &Filename,
+ std::string *Err);
+}
+
+#endif // LLVM_SUPPORT_DATASTREAM_H_
« no previous file with comments | « pnacl-llvm/StreamingMemoryObject.cpp ('k') | pnacl-llvm/include/llvm/Support/MemoryObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698