aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Bitcode/Deserialize.h
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2007-11-09 00:43:51 +0000
committerTed Kremenek <kremenek@apple.com>2007-11-09 00:43:51 +0000
commit48a396948fb7b5eb1af744c96430a642796cf303 (patch)
tree4998167b5fd69536a417e721ab6404bc6bdcf5af /include/llvm/Bitcode/Deserialize.h
parentdbaf378350b490978a2ffc8157022ddbff2bd7ec (diff)
Updated Deserializer class to provide more information about the current
block that is being visited in the bitstream. The client can also now skip blocks before reading them, and query the current abbreviation number as seen from the perspective of the Deserializer. This allows the client to be more interactive in the deserialization process (if they so choose). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43916 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Bitcode/Deserialize.h')
-rw-r--r--include/llvm/Bitcode/Deserialize.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/include/llvm/Bitcode/Deserialize.h b/include/llvm/Bitcode/Deserialize.h
index c98b4e810a..4ab35c04b1 100644
--- a/include/llvm/Bitcode/Deserialize.h
+++ b/include/llvm/Bitcode/Deserialize.h
@@ -88,12 +88,14 @@ public:
private:
BitstreamReader& Stream;
- SmallVector<uint64_t,10> Record;
+ SmallVector<uint64_t,20> Record;
unsigned RecIdx;
BumpPtrAllocator Allocator;
BPNode* FreeList;
MapTy BPatchMap;
- llvm::SmallVector<uint64_t,5> BlockLocs;
+ llvm::SmallVector<std::pair<Location,unsigned>,5> BlockStack;
+ unsigned AbbrevNo;
+ unsigned RecordCode;
//===----------------------------------------------------------===//
// Public Interface.
@@ -231,14 +233,22 @@ public:
RegisterPtr(PtrID,&x);
}
- Location GetCurrentBlockLocation();
+ Location getCurrentBlockLocation();
+ unsigned getCurrentBlockID();
+ unsigned getAbbrevNo();
+
bool FinishedBlock(Location BlockLoc);
bool AtEnd();
bool inRecord();
+ void SkipBlock();
+
+ unsigned getRecordCode();
private:
- void ReadRecord();
+ bool AdvanceStream();
+ void ReadRecord();
+
uintptr_t ReadInternalRefPtr();
static inline bool HasFinalPtr(MapTy::value_type& V) {