mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-05 14:34:55 +00:00
fe2a012338
for backpatching. Added Deserialize::ReadVal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43319 91177308-0d34-0410-b5e6-96231b3b80d8
41 lines
1.1 KiB
C++
41 lines
1.1 KiB
C++
//==- Serialization.h - Generic Object Serialization to Bitcode ---*- C++ -*-=//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file was developed by Ted Kremenek and is distributed under the
|
|
// University of Illinois Open Source License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file defines the interface for generic object serialization to
|
|
// LLVM bitcode.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_BITCODE_SERIALIZE
|
|
#define LLVM_BITCODE_SERIALIZE
|
|
|
|
namespace llvm {
|
|
|
|
class Serializer;
|
|
class Deserializer;
|
|
template <typename T> struct SerializeTrait;
|
|
|
|
#define SERIALIZE_INT_TRAIT(TYPE)\
|
|
template <> struct SerializeTrait<TYPE> {\
|
|
static void Emit(Serializer& S, TYPE X);\
|
|
static void Read(Deserializer& S, TYPE& X);\
|
|
static TYPE ReadVal(Deserializer& S); };
|
|
|
|
SERIALIZE_INT_TRAIT(bool)
|
|
SERIALIZE_INT_TRAIT(unsigned char)
|
|
SERIALIZE_INT_TRAIT(unsigned short)
|
|
SERIALIZE_INT_TRAIT(unsigned int)
|
|
SERIALIZE_INT_TRAIT(unsigned long)
|
|
|
|
#undef SERIALIZE_INT_TRAIT
|
|
|
|
} // end namespace llvm
|
|
|
|
#endif
|