LLVM 22.0.0git
NamedStreamMap.h
Go to the documentation of this file.
1//===- NamedStreamMap.h - PDB Named Stream Map ------------------*- 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_NAMEDSTREAMMAP_H
10#define LLVM_DEBUGINFO_PDB_NATIVE_NAMEDSTREAMMAP_H
11
12#include "llvm/ADT/StringMap.h"
13#include "llvm/ADT/StringRef.h"
16#include "llvm/Support/Error.h"
17#include <cstdint>
18
19namespace llvm {
20
21class BinaryStreamReader;
22class BinaryStreamWriter;
23
24namespace pdb {
25
26class NamedStreamMap;
27
30
35};
36
39
40public:
42
46
47 LLVM_ABI uint32_t size() const;
48 LLVM_ABI bool get(StringRef Stream, uint32_t &StreamNo) const;
49 LLVM_ABI void set(StringRef Stream, uint32_t StreamNo);
50
54
56
57private:
58 NamedStreamMapTraits HashTraits;
59 /// Closed hash table from Offset -> StreamNumber, where Offset is the offset
60 /// of the stream name in NamesBuffer.
62
63 /// Buffer of string data.
64 std::vector<char> NamesBuffer;
65};
66
67} // end namespace pdb
68
69} // end namespace llvm
70
71#endif // LLVM_DEBUGINFO_PDB_NATIVE_NAMEDSTREAMMAP_H
This file defines the StringMap class.
AMDGPU Mark last scratch load
#define LLVM_ABI
Definition: Compiler.h:213
Provides read only access to a subclass of BinaryStream.
Provides write only access to a subclass of WritableBinaryStream.
Lightweight error class with error context and mandatory checking.
Definition: Error.h:159
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
Definition: StringMap.h:133
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:55
LLVM_ABI void set(StringRef Stream, uint32_t StreamNo)
LLVM_ABI StringMap< uint32_t > entries() const
LLVM_ABI Error commit(BinaryStreamWriter &Writer) const
LLVM_ABI uint32_t hashString(uint32_t Offset) const
LLVM_ABI uint32_t appendStringData(StringRef S)
LLVM_ABI bool get(StringRef Stream, uint32_t &StreamNo) const
LLVM_ABI StringRef getString(uint32_t Offset) const
LLVM_ABI uint32_t size() const
friend class NamedStreamMapBuilder
LLVM_ABI uint32_t calculateSerializedLength() const
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
LLVM_ABI uint16_t hashLookupKey(StringRef S) const
LLVM_ABI uint32_t lookupKeyToStorageKey(StringRef S)
LLVM_ABI StringRef storageKeyToLookupKey(uint32_t Offset) const