Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:43:40

0001 //===- SimpleTypeSerializer.h -----------------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLVM_DEBUGINFO_CODEVIEW_SIMPLETYPESERIALIZER_H
0010 #define LLVM_DEBUGINFO_CODEVIEW_SIMPLETYPESERIALIZER_H
0011 
0012 #include "llvm/ADT/ArrayRef.h"
0013 #include <vector>
0014 
0015 namespace llvm {
0016 namespace codeview {
0017 class FieldListRecord;
0018 
0019 class SimpleTypeSerializer {
0020   std::vector<uint8_t> ScratchBuffer;
0021 
0022 public:
0023   SimpleTypeSerializer();
0024   ~SimpleTypeSerializer();
0025 
0026   // This template is explicitly instantiated in the implementation file for all
0027   // supported types.  The method itself is ugly, so inlining it into the header
0028   // file clutters an otherwise straightforward interface.
0029   template <typename T> ArrayRef<uint8_t> serialize(T &Record);
0030 
0031   // Don't allow serialization of field list records using this interface.
0032   ArrayRef<uint8_t> serialize(const FieldListRecord &Record) = delete;
0033 };
0034 
0035 } // end namespace codeview
0036 } // end namespace llvm
0037 
0038 #endif // LLVM_DEBUGINFO_CODEVIEW_SIMPLETYPESERIALIZER_H