diff options
author | Ted Kremenek <kremenek@apple.com> | 2007-11-05 21:36:35 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2007-11-05 21:36:35 +0000 |
commit | 6fcfdf5490e5b5f9fb02e43348f64075d11d3329 (patch) | |
tree | 864684a5e5e7b95e1e2b6c38a2903a4eeae4bc25 /include/llvm/Bitcode/Serialize.h | |
parent | cfb19e6297a5527845fd6c14b7dff5dea34b6a25 (diff) | |
download | external_llvm-6fcfdf5490e5b5f9fb02e43348f64075d11d3329.zip external_llvm-6fcfdf5490e5b5f9fb02e43348f64075d11d3329.tar.gz external_llvm-6fcfdf5490e5b5f9fb02e43348f64075d11d3329.tar.bz2 |
Added support in serializer and deserializer to create arbitrary blocks.
Added detection of end-of-stream in deserializer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43736 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Bitcode/Serialize.h')
-rw-r--r-- | include/llvm/Bitcode/Serialize.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/llvm/Bitcode/Serialize.h b/include/llvm/Bitcode/Serialize.h index a465bec..74637f5 100644 --- a/include/llvm/Bitcode/Serialize.h +++ b/include/llvm/Bitcode/Serialize.h @@ -25,7 +25,7 @@ namespace llvm { class Serializer { BitstreamWriter& Stream; SmallVector<uint64_t,10> Record; - bool inBlock; + unsigned BlockLevel; typedef DenseMap<const void*,unsigned> MapTy; MapTy PtrMap; @@ -56,6 +56,9 @@ public: void Flush() { if (inRecord()) EmitRecord(); } + void EnterBlock(unsigned BlockID = 8, unsigned CodeLen = 3); + void ExitBlock(); + private: void EmitRecord(); inline bool inRecord() { return Record.size() > 0; } |