LLVM 23.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 {
25
26namespace msf {
27struct MSFLayout;
28}
29
30namespace pdb {
31
32class PDBFileBuilder;
34
44
46public:
47 // If string S does not exist in the string table, insert it.
48 // Returns the ID for S.
50
53
56
58
59private:
60 uint32_t calculateHashTableSize() const;
61 Error writeHeader(BinaryStreamWriter &Writer) const;
62 Error writeStrings(BinaryStreamWriter &Writer) const;
63 Error writeHashTable(BinaryStreamWriter &Writer) const;
64 Error writeEpilogue(BinaryStreamWriter &Writer) const;
65
67};
68
69} // end namespace pdb
70} // end namespace llvm
71
72#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
Represent a constant reference to a string, i.e.
Definition StringRef.h:56
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.
LLVM_ABI uint32_t hashLookupKey(StringRef S) const
LLVM_ABI StringRef storageKeyToLookupKey(uint32_t Offset) const
LLVM_ABI StringTableHashTraits()=default
LLVM_ABI uint32_t lookupKeyToStorageKey(StringRef S)