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

Side by Side Diff: include/llvm/Bitcode/BitcodeStream.h

Issue 8393017: Bitcode streaming (Closed)
Patch Set: rebase against upstream LLVM Created 9 years, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
1 //===---- llvm/Bitcode/BitcodeStream.h - ----*- C++ -*-===//
nlewycky 2011/11/05 00:45:06 Missing explanation of the file, also make it exac
(google.com) Derek Schuff 2011/11/07 17:32:09 OK. I'm a little unclear on exactly what is suppos
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 // Support for streaming (lazy reading) of bitcode files on disk
nlewycky 2011/11/05 00:45:06 End with "."
(google.com) Derek Schuff 2011/11/07 17:59:35 Done.
11 //
12 //===----------------------------------------------------------------------===//
13
14
15 #ifndef BITCODESTREAM_H_
nlewycky 2011/11/05 00:45:06 Please use LLVM_BITCODE_BITCODESTREAM_H for simila
(google.com) Derek Schuff 2011/11/07 17:59:35 Done.
16 #define BITCODESTREAM_H_
17
18 #include <stddef.h>
nlewycky 2011/11/05 00:45:06 What do you need this for?
(google.com) Derek Schuff 2011/11/07 17:59:35 Originally had it for size_t. no longer necessary
19 #include <string>
20
21 namespace llvm {
22 class MemoryBuffer;
23
24 class BitcodeStreamer {
25 public:
26 /// Fetch bytes [start-end) from the bitcode stream, and write them to the
27 /// buffer pointed to by buf. Returns the number of bytes actually written.
28 // TODO(dschuff): what's the right way to get useful error info?
29 // string pointer out-arg? additional function to be called on short read?
30 virtual size_t GetBytes(unsigned char* buf, size_t len) = 0;
31 /// Returns true if the streamer owns its backing store (e.g. MemoryBuffer)
nlewycky 2011/11/05 00:45:06 Newline to separate from above decl
(google.com) Derek Schuff 2011/11/07 17:59:35 Done.
32 virtual ~BitcodeStreamer() {}
nlewycky 2011/11/05 00:45:06 Declare the virtual destructor here, but please it
(google.com) Derek Schuff 2011/11/07 17:59:35 Done.
33 };
34
35 BitcodeStreamer* getBitcodeFileStreamer(const std::string &Filename,
36 std::string *Err);
37
38 BitcodeStreamer* getBitcodeMemoryStreamer(const char* Start, size_t Len);
39 BitcodeStreamer* getBitcodeMemoryBufferStreamer(MemoryBuffer *Buf);
nlewycky 2011/11/05 00:45:06 "BitcodeStreamer* " vs. "MemoryBuffer *". Please b
(google.com) Derek Schuff 2011/11/07 17:59:35 OK. hopefully I got them all in this pass. On 2011
40 }
41
42 #endif // BITCODESTREAM_H_
OLDNEW
« no previous file with comments | « no previous file | include/llvm/Bitcode/BitstreamReader.h » ('j') | include/llvm/Bitcode/BitstreamReader.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698