1//===- DebugStringTableSubsection.h - CodeView String Table -----*- C++ -*-===//
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
7//===----------------------------------------------------------------------===//
9#ifndef LLVM_DEBUGINFO_CODEVIEW_DEBUGSTRINGTABLESUBSECTION_H
10#define LLVM_DEBUGINFO_CODEVIEW_DEBUGSTRINGTABLESUBSECTION_H
28/// Represents a read-only view of a CodeView string table. This is a very
29/// simple flat buffer consisting of null-terminated strings, where strings
30/// are retrieved by their offset in the buffer. DebugStringTableSubsectionRef
31/// does not own the underlying storage for the buffer.
45 bool valid()
const {
return Stream.valid(); }
53/// Represents a read-write view of a CodeView string table.
54/// DebugStringTableSubsection owns the underlying storage for the table, and is
55/// capable of serializing the string table into a format understood by
56/// DebugStringTableSubsectionRef.
65 // If string S does not exist in the string table, insert it.
66 // Returns the ID for S.
69 // Return the ID for string S. Assumes S exists in the table.
74 uint32_t calculateSerializedSize()
const override;
80 return StringToId.
begin();
85 std::vector<uint32_t> sortedIds()
const;
93}
// end namespace codeview
95}
// end namespace llvm
97#endif // LLVM_DEBUGINFO_CODEVIEW_DEBUGSTRINGTABLESUBSECTION_H
This file defines the StringMap class.
This file defines the DenseMap class.
Provides read only access to a subclass of BinaryStream.
BinaryStreamRef is to BinaryStream what ArrayRef is to an Array.
Provides write only access to a subclass of WritableBinaryStream.
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
StringMapIterBase< ValueTy, true > const_iterator
StringRef - Represent a constant reference to a string, i.e.
BinaryStreamRef getBuffer() const
static bool classof(const DebugSubsectionRef *S)
LLVM_ABI Expected< StringRef > getString(uint32_t Offset) const
LLVM_ABI DebugStringTableSubsectionRef()
LLVM_ABI Error initialize(BinaryStreamRef Contents)
StringMap< uint32_t >::const_iterator begin() const
DebugStringTableSubsection()
StringMap< uint32_t >::const_iterator end() const
static bool classof(const DebugSubsection *S)
DebugSubsectionKind kind() const
DebugSubsectionRef(DebugSubsectionKind Kind)
DebugSubsection(DebugSubsectionKind Kind)
DebugSubsectionKind kind() const
This is an optimization pass for GlobalISel generic memory operations.
auto size(R &&Range, std::enable_if_t< std::is_base_of< std::random_access_iterator_tag, typename std::iterator_traits< decltype(Range.begin())>::iterator_category >::value, void > *=nullptr)
Get the size of a range.