Back to home page

EIC code displayed by LXR

 
 

    


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

0001 //===- SymbolRecordMapping.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_SYMBOLRECORDMAPPING_H
0010 #define LLVM_DEBUGINFO_CODEVIEW_SYMBOLRECORDMAPPING_H
0011 
0012 #include "llvm/DebugInfo/CodeView/CodeViewRecordIO.h"
0013 #include "llvm/DebugInfo/CodeView/SymbolVisitorCallbacks.h"
0014 
0015 namespace llvm {
0016 class BinaryStreamReader;
0017 class BinaryStreamWriter;
0018 
0019 namespace codeview {
0020 class SymbolRecordMapping : public SymbolVisitorCallbacks {
0021 public:
0022   explicit SymbolRecordMapping(BinaryStreamReader &Reader,
0023                                CodeViewContainer Container)
0024       : IO(Reader), Container(Container) {}
0025   explicit SymbolRecordMapping(BinaryStreamWriter &Writer,
0026                                CodeViewContainer Container)
0027       : IO(Writer), Container(Container) {}
0028 
0029   Error visitSymbolBegin(CVSymbol &Record) override;
0030   Error visitSymbolEnd(CVSymbol &Record) override;
0031 
0032 #define SYMBOL_RECORD(EnumName, EnumVal, Name)                                 \
0033   Error visitKnownRecord(CVSymbol &CVR, Name &Record) override;
0034 #define SYMBOL_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
0035 #include "llvm/DebugInfo/CodeView/CodeViewSymbols.def"
0036 
0037 private:
0038   std::optional<SymbolKind> Kind;
0039 
0040   CodeViewRecordIO IO;
0041   CodeViewContainer Container;
0042 };
0043 }
0044 }
0045 
0046 #endif