]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolRecordMapping.h
Merge ^/head r318560 through r318657.
[FreeBSD/FreeBSD.git] / contrib / llvm / include / llvm / DebugInfo / CodeView / SymbolRecordMapping.h
1 //===- SymbolRecordMapping.h ------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef LLVM_DEBUGINFO_CODEVIEW_SYMBOLRECORDMAPPING_H
11 #define LLVM_DEBUGINFO_CODEVIEW_SYMBOLRECORDMAPPING_H
12
13 #include "llvm/DebugInfo/CodeView/CodeViewRecordIO.h"
14 #include "llvm/DebugInfo/CodeView/SymbolVisitorCallbacks.h"
15
16 namespace llvm {
17 class BinaryStreamReader;
18 class BinaryStreamWriter;
19
20 namespace codeview {
21 class SymbolRecordMapping : public SymbolVisitorCallbacks {
22 public:
23   explicit SymbolRecordMapping(BinaryStreamReader &Reader) : IO(Reader) {}
24   explicit SymbolRecordMapping(BinaryStreamWriter &Writer) : IO(Writer) {}
25
26   Error visitSymbolBegin(CVSymbol &Record) override;
27   Error visitSymbolEnd(CVSymbol &Record) override;
28
29 #define SYMBOL_RECORD(EnumName, EnumVal, Name)                                 \
30   Error visitKnownRecord(CVSymbol &CVR, Name &Record) override;
31 #define SYMBOL_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
32 #include "CVSymbolTypes.def"
33
34 private:
35   Optional<SymbolKind> Kind;
36
37   CodeViewRecordIO IO;
38 };
39 }
40 }
41
42 #endif