[InstCombine] Signed saturation patterns
[llvm-core.git] / include / llvm / DebugInfo / CodeView / SymbolRecordMapping.h
blob34368b6185d65ae6b2654ee5b15222b6a5839e8c
1 //===- SymbolRecordMapping.h ------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_DEBUGINFO_CODEVIEW_SYMBOLRECORDMAPPING_H
10 #define LLVM_DEBUGINFO_CODEVIEW_SYMBOLRECORDMAPPING_H
12 #include "llvm/DebugInfo/CodeView/CodeViewRecordIO.h"
13 #include "llvm/DebugInfo/CodeView/SymbolVisitorCallbacks.h"
15 namespace llvm {
16 class BinaryStreamReader;
17 class BinaryStreamWriter;
19 namespace codeview {
20 class SymbolRecordMapping : public SymbolVisitorCallbacks {
21 public:
22 explicit SymbolRecordMapping(BinaryStreamReader &Reader,
23 CodeViewContainer Container)
24 : IO(Reader), Container(Container) {}
25 explicit SymbolRecordMapping(BinaryStreamWriter &Writer,
26 CodeViewContainer Container)
27 : IO(Writer), Container(Container) {}
29 Error visitSymbolBegin(CVSymbol &Record) override;
30 Error visitSymbolEnd(CVSymbol &Record) override;
32 #define SYMBOL_RECORD(EnumName, EnumVal, Name) \
33 Error visitKnownRecord(CVSymbol &CVR, Name &Record) override;
34 #define SYMBOL_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
35 #include "llvm/DebugInfo/CodeView/CodeViewSymbols.def"
37 private:
38 Optional<SymbolKind> Kind;
40 CodeViewRecordIO IO;
41 CodeViewContainer Container;
46 #endif