LLVM 20.0.0git
PDBStringTable.h
Go to the documentation of this file.
1//===- PDBStringTable.h - PDB String Table -----------------------*- 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_PDBSTRINGTABLE_H
10#define LLVM_DEBUGINFO_PDB_NATIVE_PDBSTRINGTABLE_H
11
12#include "llvm/ADT/StringRef.h"
15#include "llvm/Support/Endian.h"
16#include "llvm/Support/Error.h"
17#include <cstdint>
18
19namespace llvm {
20class BinaryStreamReader;
21
22namespace pdb {
23
24struct PDBStringTableHeader;
25
27public:
29
30 uint32_t getByteSize() const;
31 uint32_t getNameCount() const;
33 uint32_t getSignature() const;
34
37
39
41
42private:
43 Error readHeader(BinaryStreamReader &Reader);
44 Error readStrings(BinaryStreamReader &Reader);
45 Error readHashTable(BinaryStreamReader &Reader);
46 Error readEpilogue(BinaryStreamReader &Reader);
47
48 const PDBStringTableHeader *Header = nullptr;
51 uint32_t NameCount = 0;
52};
53
54} // end namespace pdb
55} // end namespace llvm
56
57#endif // LLVM_DEBUGINFO_PDB_NATIVE_PDBSTRINGTABLE_H
Lightweight arrays that are backed by an arbitrary BinaryStream.
Provides read only access to a subclass of BinaryStream.
Lightweight error class with error context and mandatory checking.
Definition: Error.h:160
Tagged union holding either a T or a Error.
Definition: Error.h:481
FixedStreamArray is similar to VarStreamArray, except with each record having a fixed-length.
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:51
Represents a read-only view of a CodeView string table.
const codeview::DebugStringTableSubsectionRef & getStringTable() const
uint32_t getSignature() const
uint32_t getNameCount() const
Expected< uint32_t > getIDForString(StringRef Str) const
Error reload(BinaryStreamReader &Reader)
Expected< StringRef > getStringForID(uint32_t ID) const
uint32_t getByteSize() const
uint32_t getHashVersion() const
FixedStreamArray< support::ulittle32_t > name_ids() const
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
The header preceding the /names stream.
Definition: RawTypes.h:312