aboutsummaryrefslogtreecommitdiffstats
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
commit9493bb345c0602e92a739e804c941082e3c3faf5 (patch)
tree4998167b5fd69536a417e721ab6404bc6bdcf5af /include/llvm/Bitcode/Deserialize.h
parentd355922711d365178520eecf60fb3f3d1ecb1bee (diff)
downloadexternal_llvm-9493bb345c0602e92a739e804c941082e3c3faf5.zip
external_llvm-9493bb345c0602e92a739e804c941082e3c3faf5.tar.gz
external_llvm-9493bb345c0602e92a739e804c941082e3c3faf5.tar.bz2
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 c98b4e8..4ab35c0 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) {