LLVM  10.0.0svn
DebugCrossImpSubsection.h
Go to the documentation of this file.
1 //===- DebugCrossImpSubsection.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_DEBUGCROSSIMPSUBSECTION_H
10 #define LLVM_DEBUGINFO_CODEVIEW_DEBUGCROSSIMPSUBSECTION_H
11 
12 #include "llvm/ADT/StringMap.h"
13 #include "llvm/ADT/StringRef.h"
19 #include "llvm/Support/Endian.h"
20 #include "llvm/Support/Error.h"
21 #include <cstdint>
22 #include <vector>
23 
24 namespace llvm {
25 
26 namespace codeview {
27 
29  const CrossModuleImport *Header = nullptr;
31 };
32 
33 } // end namespace codeview
34 
35 template <> struct VarStreamArrayExtractor<codeview::CrossModuleImportItem> {
36 public:
37  using ContextType = void;
38 
39  Error operator()(BinaryStreamRef Stream, uint32_t &Len,
41 };
42 
43 namespace codeview {
44 
45 class DebugStringTableSubsection;
46 
50 
51 public:
54 
55  static bool classof(const DebugSubsectionRef *S) {
57  }
58 
61 
62  Iterator begin() const { return References.begin(); }
63  Iterator end() const { return References.end(); }
64 
65 private:
66  ReferenceArray References;
67 };
68 
70 public:
74  Strings(Strings) {}
75 
76  static bool classof(const DebugSubsection *S) {
78  }
79 
80  void addImport(StringRef Module, uint32_t ImportId);
81 
82  uint32_t calculateSerializedSize() const override;
83  Error commit(BinaryStreamWriter &Writer) const override;
84 
85 private:
88 };
89 
90 } // end namespace codeview
91 
92 } // end namespace llvm
93 
94 #endif // LLVM_DEBUGINFO_CODEVIEW_DEBUGCROSSIMPSUBSECTION_H
This class represents lattice values for constants.
Definition: AllocatorList.h:23
A Module instance is used to store all the information related to an LLVM module. ...
Definition: Module.h:66
VarStreamArrayExtractor is intended to be specialized to provide customized extraction logic...
DebugCrossModuleImportsSubsection(DebugStringTableSubsection &Strings)
static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, ArrayRef< StringLiteral > StandardNames)
Initialize the set of available library functions based on the specified target triple.
static bool classof(const DebugSubsectionRef *S)
Provides write only access to a subclass of WritableBinaryStream.
Represents a read-write view of a CodeView string table.
FixedStreamArray< support::ulittle32_t > Imports
BinaryStreamRef is to BinaryStream what ArrayRef is to an Array.
VarStreamArray represents an array of variable length records backed by a stream. ...
DebugSubsectionKind kind() const
StringMap - This is an unconventional map that is specialized for handling keys that are "strings"...
Definition: StringMap.h:242
Lightweight error class with error context and mandatory checking.
Definition: Error.h:157
Provides read only access to a subclass of BinaryStream.
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:48
DebugSubsectionKind kind() const