]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolRecordMapping.h
Update clang, llvm, lld, lldb, compiler-rt and libc++ to 4.0.0 release.
[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 namespace msf {
18 class StreamReader;
19 class StreamWriter;
20 }
21
22 namespace codeview {
23 class SymbolRecordMapping : public SymbolVisitorCallbacks {
24 public:
25   explicit SymbolRecordMapping(msf::StreamReader &Reader) : IO(Reader) {}
26   explicit SymbolRecordMapping(msf::StreamWriter &Writer) : IO(Writer) {}
27
28   Error visitSymbolBegin(CVSymbol &Record) override;
29   Error visitSymbolEnd(CVSymbol &Record) override;
30
31 #define SYMBOL_RECORD(EnumName, EnumVal, Name)                                 \
32   Error visitKnownRecord(CVSymbol &CVR, Name &Record) override;
33 #define SYMBOL_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
34 #include "CVSymbolTypes.def"
35
36 private:
37   Optional<SymbolKind> Kind;
38
39   CodeViewRecordIO IO;
40 };
41 }
42 }
43
44 #endif