LLVM 19.0.0git
DbiModuleDescriptor.h
Go to the documentation of this file.
1//===- DbiModuleDescriptor.h - PDB module information -----------*- 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_PDB_NATIVE_DBIMODULEDESCRIPTOR_H
10#define LLVM_DEBUGINFO_PDB_NATIVE_DBIMODULEDESCRIPTOR_H
11
12#include "llvm/ADT/StringRef.h"
14#include "llvm/Support/Error.h"
15#include <cstdint>
16
17namespace llvm {
18template <typename T> struct VarStreamArrayExtractor;
19
20namespace pdb {
21struct ModuleInfoHeader;
22struct SectionContrib;
24 friend class DbiStreamBuilder;
25
26public:
30
32
33 bool hasECInfo() const;
42
45
47
48 const SectionContrib &getSectionContrib() const;
49
50private:
52 StringRef ObjFileName;
53 const ModuleInfoHeader *Layout = nullptr;
54};
55
56} // end namespace pdb
57
58template <> struct VarStreamArrayExtractor<pdb::DbiModuleDescriptor> {
61 if (auto EC = pdb::DbiModuleDescriptor::initialize(Stream, Info))
62 return EC;
63 Length = Info.getRecordLength();
64 return Error::success();
65 }
66};
67
68} // end namespace llvm
69
70#endif // LLVM_DEBUGINFO_PDB_NATIVE_DBIMODULEDESCRIPTOR_H
Analysis containing CSE Info
Definition: CSEInfo.cpp:27
BinaryStreamRef is to BinaryStream what ArrayRef is to an Array.
Lightweight error class with error context and mandatory checking.
Definition: Error.h:160
static ErrorSuccess success()
Create a success value.
Definition: Error.h:337
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
const SectionContrib & getSectionContrib() const
static Error initialize(BinaryStreamRef Stream, DbiModuleDescriptor &Info)
DbiModuleDescriptor(const DbiModuleDescriptor &Info)=default
DbiModuleDescriptor & operator=(const DbiModuleDescriptor &Info)=default
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
@ Length
Definition: DWP.cpp:456
Error operator()(BinaryStreamRef Stream, uint32_t &Length, pdb::DbiModuleDescriptor &Info)
VarStreamArrayExtractor is intended to be specialized to provide customized extraction logic.
The header preceding each entry in the Module Info substream of the DBI stream.
Definition: RawTypes.h:212