summaryrefslogtreecommitdiff
path: root/tools/llvm-bcanalyzer
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-26 20:59:02 +0000
committerChris Lattner <sabre@nondot.org>2009-04-26 20:59:02 +0000
commit962dde3cef3184f1683d5070c298c9a29509d62e (patch)
tree408bbdf7f92bb2a9e5490551f82d6ccdeb4ea0b3 /tools/llvm-bcanalyzer
parent3485d25a0e3355a13a9fe073fa5cd98838431ef0 (diff)
downloadllvm-962dde3cef3184f1683d5070c298c9a29509d62e.tar.gz
llvm-962dde3cef3184f1683d5070c298c9a29509d62e.tar.bz2
llvm-962dde3cef3184f1683d5070c298c9a29509d62e.tar.xz
Make a major API change to BitstreamReader: split all the reading
state out of the BitstreamReader class into a BitstreamCursor class. Doing this allows the client to have multiple cursors into the same file, each with potentially different live block stacks and abbreviation records. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70157 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-bcanalyzer')
-rw-r--r--tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp b/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
index 4832a4c0b2..182404c4d1 100644
--- a/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
+++ b/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
@@ -262,7 +262,7 @@ static bool Error(const std::string &Err) {
}
/// ParseBlock - Read a block, updating statistics, etc.
-static bool ParseBlock(BitstreamReader &Stream, unsigned IndentLevel) {
+static bool ParseBlock(BitstreamCursor &Stream, unsigned IndentLevel) {
std::string Indent(IndentLevel*2, ' ');
uint64_t BlockBitStart = Stream.GetCurrentBitNo();
unsigned BlockID = Stream.ReadSubBlockID();
@@ -420,8 +420,8 @@ static int AnalyzeBitcode() {
if (SkipBitcodeWrapperHeader(BufPtr, EndBufPtr))
return Error("Invalid bitcode wrapper header");
- BitstreamReader Stream(BufPtr, EndBufPtr);
-
+ BitstreamReader StreamFile(BufPtr, EndBufPtr);
+ BitstreamCursor Stream(StreamFile);
// Read the stream signature.
char Signature[6];