mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 06:32:24 +00:00
3b8ac40e63
object serialization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43352 91177308-0d34-0410-b5e6-96231b3b80d8
39 lines
1.1 KiB
C++
39 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 traits for primitive types used for both object
|
|
// serialization and deserialization.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_BITCODE_SERIALIZE
|
|
#define LLVM_BITCODE_SERIALIZE
|
|
|
|
#include "llvm/Bitcode/SerializationFwd.h"
|
|
|
|
namespace llvm {
|
|
|
|
#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
|