LLVM 22.0.0git
DebugCrossExSubsection.h
Go to the documentation of this file.
1//===- DebugCrossExSubsection.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//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_DEBUGINFO_CODEVIEW_DEBUGCROSSEXSUBSECTION_H
10#define LLVM_DEBUGINFO_CODEVIEW_DEBUGCROSSEXSUBSECTION_H
11
17#include "llvm/Support/Error.h"
18#include <cstdint>
19#include <map>
20
21namespace llvm {
22class BinaryStreamReader;
23class BinaryStreamWriter;
24namespace codeview {
25
29
30public:
33
34 static bool classof(const DebugSubsectionRef *S) {
36 }
37
40
41 Iterator begin() const { return References.begin(); }
42 Iterator end() const { return References.end(); }
43
44private:
46};
47
49 : public DebugSubsection {
50public:
53
54 static bool classof(const DebugSubsection *S) {
55 return S->kind() == DebugSubsectionKind::CrossScopeExports;
56 }
57
58 void addMapping(uint32_t Local, uint32_t Global);
59
60 uint32_t calculateSerializedSize() const override;
61 Error commit(BinaryStreamWriter &Writer) const override;
62
63private:
64 std::map<uint32_t, uint32_t> Mappings;
65};
66
67} // end namespace codeview
68} // end namespace llvm
69
70#endif // LLVM_DEBUGINFO_CODEVIEW_DEBUGCROSSEXSUBSECTION_H
Lightweight arrays that are backed by an arbitrary BinaryStream.
#define LLVM_ABI
Definition: Compiler.h:213
Provides read only access to a subclass of BinaryStream.
BinaryStreamRef is to BinaryStream what ArrayRef is to an Array.
Provides write only access to a subclass of WritableBinaryStream.
Lightweight error class with error context and mandatory checking.
Definition: Error.h:159
FixedStreamArray is similar to VarStreamArray, except with each record having a fixed-length.
FixedStreamArrayIterator< T > Iterator
LLVM_ABI Error initialize(BinaryStreamReader Reader)
static bool classof(const DebugSubsectionRef *S)
static bool classof(const DebugSubsection *S)
DebugSubsectionKind kind() const
DebugSubsectionKind kind() const
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18