aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Bitcode/Serialize.h
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2007-11-08 19:50:46 +0000
committerTed Kremenek <kremenek@apple.com>2007-11-08 19:50:46 +0000
commitec8cd0655523627004ae4dac8e363ffa7bd25936 (patch)
treed52777fd7834c4670b697826a2f9dd103f697672 /include/llvm/Bitcode/Serialize.h
parentb410df995c592491746ed76039edb62f5cdbf8cf (diff)
Added typedef "SerializedPtrID" to represent the pointer handle written to disk
instead of just using "unsigned". This gives us more flexibility in changing the definition of the handle later, and is more self-documenting. Added tracking of block stack in the Deserializer. Now clients can query if they are still within a block using the methods GetCurrentBlockLocation() and FinishedBlock(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43903 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Bitcode/Serialize.h')
-rw-r--r--include/llvm/Bitcode/Serialize.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/llvm/Bitcode/Serialize.h b/include/llvm/Bitcode/Serialize.h
index b11a8d7366..2cd597e905 100644
--- a/include/llvm/Bitcode/Serialize.h
+++ b/include/llvm/Bitcode/Serialize.h
@@ -93,16 +93,17 @@ public:
for (unsigned i = 0; i < NumPtrs; ++i)
if (Ptrs[i]) SerializeTrait<T>::Emit(*this,*Ptrs[i]);
}
+
+ bool isRegistered(const void* p) const;
- void FlushRecord() { if (inRecord()) EmitRecord(); }
-
+ void FlushRecord() { if (inRecord()) EmitRecord(); }
void EnterBlock(unsigned BlockID = 8, unsigned CodeLen = 3);
void ExitBlock();
private:
void EmitRecord();
inline bool inRecord() { return Record.size() > 0; }
- unsigned getPtrId(const void* ptr);
+ SerializedPtrID getPtrId(const void* ptr);
};
} // end namespace llvm