LLVM  16.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 
16 #include "llvm/Support/Error.h"
17 #include <cstdint>
18 #include <map>
19 
20 namespace llvm {
21 class BinaryStreamReader;
22 class BinaryStreamWriter;
23 namespace codeview {
24 
28 
29 public:
32 
33  static bool classof(const DebugSubsectionRef *S) {
34  return S->kind() == DebugSubsectionKind::CrossScopeExports;
35  }
36 
39 
40  Iterator begin() const { return References.begin(); }
41  Iterator end() const { return References.end(); }
42 
43 private:
45 };
46 
48 public:
51 
52  static bool classof(const DebugSubsection *S) {
53  return S->kind() == DebugSubsectionKind::CrossScopeExports;
54  }
55 
56  void addMapping(uint32_t Local, uint32_t Global);
57 
58  uint32_t calculateSerializedSize() const override;
59  Error commit(BinaryStreamWriter &Writer) const override;
60 
61 private:
62  std::map<uint32_t, uint32_t> Mappings;
63 };
64 
65 } // end namespace codeview
66 } // end namespace llvm
67 
68 #endif // LLVM_DEBUGINFO_CODEVIEW_DEBUGCROSSEXSUBSECTION_H
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::BinaryStreamWriter
Provides write only access to a subclass of WritableBinaryStream.
Definition: BinaryStreamWriter.h:30
Error.h
llvm::codeview::DebugSubsectionKind::CrossScopeExports
@ CrossScopeExports
llvm::codeview::DebugCrossModuleExportsSubsectionRef::classof
static bool classof(const DebugSubsectionRef *S)
Definition: DebugCrossExSubsection.h:33
llvm::FixedStreamArray
FixedStreamArray is similar to VarStreamArray, except with each record having a fixed-length.
Definition: BinaryStreamArray.h:259
llvm::codeview::DebugCrossModuleExportsSubsection::commit
Error commit(BinaryStreamWriter &Writer) const override
Definition: DebugCrossExSubsection.cpp:44
llvm::codeview::DebugCrossModuleExportsSubsectionRef
Definition: DebugCrossExSubsection.h:25
llvm::codeview::DebugSubsectionRef
Definition: DebugSubsection.h:21
CodeView.h
llvm::codeview::DebugCrossModuleExportsSubsection::addMapping
void addMapping(uint32_t Local, uint32_t Global)
Definition: DebugCrossExSubsection.cpp:35
llvm::BinaryStreamReader
Provides read only access to a subclass of BinaryStream.
Definition: BinaryStreamReader.h:29
DebugSubsection.h
BinaryStreamArray.h
llvm::codeview::DebugCrossModuleExportsSubsection::DebugCrossModuleExportsSubsection
DebugCrossModuleExportsSubsection()
Definition: DebugCrossExSubsection.h:49
llvm::codeview::DebugCrossModuleExportsSubsectionRef::end
Iterator end() const
Definition: DebugCrossExSubsection.h:41
BinaryStreamRef.h
llvm::codeview::DebugCrossModuleExportsSubsection::calculateSerializedSize
uint32_t calculateSerializedSize() const override
Definition: DebugCrossExSubsection.cpp:40
uint32_t
llvm::codeview::DebugCrossModuleExportsSubsectionRef::initialize
Error initialize(BinaryStreamReader Reader)
Definition: DebugCrossExSubsection.cpp:19
S
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Definition: README.txt:210
llvm::codeview::DebugCrossModuleExportsSubsection
Definition: DebugCrossExSubsection.h:47
llvm::codeview::DebugSubsection
Definition: DebugSubsection.h:34
llvm::Error
Lightweight error class with error context and mandatory checking.
Definition: Error.h:155
llvm::codeview::DebugSubsectionKind
DebugSubsectionKind
Definition: CodeView.h:312
llvm::codeview::DebugCrossModuleExportsSubsectionRef::DebugCrossModuleExportsSubsectionRef
DebugCrossModuleExportsSubsectionRef()
Definition: DebugCrossExSubsection.h:30
llvm::codeview::DebugCrossModuleExportsSubsection::classof
static bool classof(const DebugSubsection *S)
Definition: DebugCrossExSubsection.h:52
llvm::codeview::DebugCrossModuleExportsSubsectionRef::begin
Iterator begin() const
Definition: DebugCrossExSubsection.h:40
llvm::FixedStreamArray::Iterator
FixedStreamArrayIterator< T > Iterator
Definition: BinaryStreamArray.h:263
llvm::FixedStreamArrayIterator
Definition: BinaryStreamArray.h:252
llvm::BinaryStreamRef
BinaryStreamRef is to BinaryStream what ArrayRef is to an Array.
Definition: BinaryStreamRef.h:155