LLVM  14.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 
21 namespace llvm {
22 namespace codeview {
23 
27 
28 public:
31 
32  static bool classof(const DebugSubsectionRef *S) {
33  return S->kind() == DebugSubsectionKind::CrossScopeExports;
34  }
35 
38 
39  Iterator begin() const { return References.begin(); }
40  Iterator end() const { return References.end(); }
41 
42 private:
44 };
45 
47 public:
50 
51  static bool classof(const DebugSubsection *S) {
52  return S->kind() == DebugSubsectionKind::CrossScopeExports;
53  }
54 
55  void addMapping(uint32_t Local, uint32_t Global);
56 
57  uint32_t calculateSerializedSize() const override;
58  Error commit(BinaryStreamWriter &Writer) const override;
59 
60 private:
61  std::map<uint32_t, uint32_t> Mappings;
62 };
63 
64 } // end namespace codeview
65 } // end namespace llvm
66 
67 #endif // LLVM_DEBUGINFO_CODEVIEW_DEBUGCROSSEXSUBSECTION_H
BinaryStreamReader.h
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
llvm::BinaryStreamWriter
Provides write only access to a subclass of WritableBinaryStream.
Definition: BinaryStreamWriter.h:31
Error.h
llvm::codeview::DebugSubsectionKind::CrossScopeExports
@ CrossScopeExports
llvm::codeview::DebugCrossModuleExportsSubsectionRef::classof
static bool classof(const DebugSubsectionRef *S)
Definition: DebugCrossExSubsection.h:32
llvm::FixedStreamArray
FixedStreamArray is similar to VarStreamArray, except with each record having a fixed-length.
Definition: BinaryStreamArray.h:262
llvm::codeview::DebugCrossModuleExportsSubsection::commit
Error commit(BinaryStreamWriter &Writer) const override
Definition: DebugCrossExSubsection.cpp:43
llvm::codeview::DebugCrossModuleExportsSubsectionRef
Definition: DebugCrossExSubsection.h:24
llvm::codeview::DebugSubsectionRef
Definition: DebugSubsection.h:19
CodeView.h
llvm::codeview::DebugCrossModuleExportsSubsection::addMapping
void addMapping(uint32_t Local, uint32_t Global)
Definition: DebugCrossExSubsection.cpp:34
llvm::BinaryStreamReader
Provides read only access to a subclass of BinaryStream.
Definition: BinaryStreamReader.h:31
DebugSubsection.h
BinaryStreamArray.h
llvm::codeview::DebugCrossModuleExportsSubsection::DebugCrossModuleExportsSubsection
DebugCrossModuleExportsSubsection()
Definition: DebugCrossExSubsection.h:48
llvm::codeview::DebugCrossModuleExportsSubsectionRef::end
Iterator end() const
Definition: DebugCrossExSubsection.h:40
BinaryStreamRef.h
llvm::codeview::DebugCrossModuleExportsSubsection::calculateSerializedSize
uint32_t calculateSerializedSize() const override
Definition: DebugCrossExSubsection.cpp:39
uint32_t
llvm::codeview::DebugCrossModuleExportsSubsectionRef::initialize
Error initialize(BinaryStreamReader Reader)
Definition: DebugCrossExSubsection.cpp:18
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:46
llvm::codeview::DebugSubsection
Definition: DebugSubsection.h:32
llvm::Error
Lightweight error class with error context and mandatory checking.
Definition: Error.h:157
llvm::codeview::DebugSubsectionKind
DebugSubsectionKind
Definition: CodeView.h:313
llvm::codeview::DebugCrossModuleExportsSubsectionRef::DebugCrossModuleExportsSubsectionRef
DebugCrossModuleExportsSubsectionRef()
Definition: DebugCrossExSubsection.h:29
llvm::codeview::DebugCrossModuleExportsSubsection::classof
static bool classof(const DebugSubsection *S)
Definition: DebugCrossExSubsection.h:51
llvm::codeview::DebugCrossModuleExportsSubsectionRef::begin
Iterator begin() const
Definition: DebugCrossExSubsection.h:39
llvm::FixedStreamArray::Iterator
FixedStreamArrayIterator< T > Iterator
Definition: BinaryStreamArray.h:266
llvm::FixedStreamArrayIterator
Definition: BinaryStreamArray.h:255
llvm::BinaryStreamRef
BinaryStreamRef is to BinaryStream what ArrayRef is to an Array.
Definition: BinaryStreamRef.h:156