mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-18 11:24:01 +00:00
Implemented serialization of signed integers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43828 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -95,6 +95,8 @@ public:
|
||||
~Deserializer();
|
||||
|
||||
uint64_t ReadInt();
|
||||
int64_t ReadSInt();
|
||||
|
||||
bool ReadBool() {
|
||||
return ReadInt() ? true : false;
|
||||
}
|
||||
|
@ -50,6 +50,11 @@ SERIALIZE_INT_TRAIT(unsigned char)
|
||||
SERIALIZE_INT_TRAIT(unsigned short)
|
||||
SERIALIZE_INT_TRAIT(unsigned int)
|
||||
SERIALIZE_INT_TRAIT(unsigned long)
|
||||
|
||||
SERIALIZE_INT_TRAIT(signed char)
|
||||
SERIALIZE_INT_TRAIT(signed short)
|
||||
SERIALIZE_INT_TRAIT(signed int)
|
||||
SERIALIZE_INT_TRAIT(signed long)
|
||||
|
||||
#undef SERIALIZE_INT_TRAIT
|
||||
|
||||
|
@ -37,7 +37,9 @@ public:
|
||||
template <typename T>
|
||||
inline void Emit(const T& X) { SerializeTrait<T>::Emit(*this,X); }
|
||||
|
||||
void EmitInt(unsigned X);
|
||||
void EmitInt(uint64_t X);
|
||||
void EmitSInt(int64_t X);
|
||||
|
||||
void EmitBool(bool X) { EmitInt(X); }
|
||||
void EmitCStr(const char* beg, const char* end);
|
||||
void EmitCStr(const char* cstr);
|
||||
|
Reference in New Issue
Block a user