LLVM 22.0.0git
PDBStringTableBuilder.h
Go to the documentation of this file.
1//===- PDBStringTableBuilder.h - PDB String Table Builder -------*- 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// This file creates the "/names" stream.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_DEBUGINFO_PDB_NATIVE_PDBSTRINGTABLEBUILDER_H
14#define LLVM_DEBUGINFO_PDB_NATIVE_PDBSTRINGTABLEBUILDER_H
15
16#include "llvm/ADT/StringRef.h"
19#include "llvm/Support/Error.h"
20#include <cstdint>
21
22namespace llvm {
23class BinaryStreamWriter;
24class WritableBinaryStreamRef;
25
26namespace msf {
27struct MSFLayout;
28}
29
30namespace pdb {
31
32class PDBFileBuilder;
33class PDBStringTableBuilder;
34
37
42};
43
45public:
46 // If string S does not exist in the string table, insert it.
47 // Returns the ID for S.
49
52
55
57
58private:
59 uint32_t calculateHashTableSize() const;
60 Error writeHeader(BinaryStreamWriter &Writer) const;
61 Error writeStrings(BinaryStreamWriter &Writer) const;
62 Error writeHashTable(BinaryStreamWriter &Writer) const;
63 Error writeEpilogue(BinaryStreamWriter &Writer) const;
64
66};
67
68} // end namespace pdb
69} // end namespace llvm
70
71#endif // LLVM_DEBUGINFO_PDB_NATIVE_PDBSTRINGTABLEBUILDER_H
#define LLVM_ABI
Definition: Compiler.h:213
Provides write only access to a subclass of WritableBinaryStream.
Lightweight error class with error context and mandatory checking.
Definition: Error.h:159
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:55
Represents a read-write view of a CodeView string table.
LLVM_ABI uint32_t insert(StringRef S)
LLVM_ABI uint32_t calculateSerializedSize() const
LLVM_ABI void setStrings(const codeview::DebugStringTableSubsection &Strings)
LLVM_ABI Error commit(BinaryStreamWriter &Writer) const
LLVM_ABI StringRef getStringForId(uint32_t Id) const
LLVM_ABI uint32_t getIdForString(StringRef S) const
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
LLVM_ABI uint32_t hashLookupKey(StringRef S) const
LLVM_ABI StringRef storageKeyToLookupKey(uint32_t Offset) const
LLVM_ABI uint32_t lookupKeyToStorageKey(StringRef S)