LLVM 24.0.0git
StringPool.h
Go to the documentation of this file.
1//===- StringPool.h ---------------------------------------------*- 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_DWARFLINKER_STRINGPOOL_H
10#define LLVM_DWARFLINKER_STRINGPOOL_H
11
16#include <string_view>
17
18namespace llvm {
19namespace dwarf_linker {
20
21/// StringEntry keeps data of the string: the length, external offset
22/// and a string body which is placed right after StringEntry.
24
27 StringRef, StringEntry, llvm::parallel::PerThreadBumpPtrAllocator> {
28public:
31 llvm::parallel::PerThreadBumpPtrAllocator>(
32 Allocator) {}
33
34 StringPool(size_t InitialSize)
36 llvm::parallel::PerThreadBumpPtrAllocator>(
37 Allocator, InitialSize) {}
38
42
43 void clear() { Allocator.Reset(); }
44
45private:
47};
48
49} // namespace dwarf_linker
50} // end namespace llvm
51
52#endif // LLVM_DWARFLINKER_STRINGPOOL_H
This file defines the BumpPtrAllocator interface.
Basic Register Allocator
ConcurrentHashTableByPtr(llvm::parallel::PerThreadBumpPtrAllocator &Allocator, uint64_t EstimatedSize=100000, size_t ThreadsNum=parallel::strategy.compute_thread_count(), size_t InitialNumberOfBuckets=128)
StringMapEntry - This is used to represent one value that is inserted into a StringMap.
Represent a constant reference to a string, i.e.
Definition StringRef.h:56
llvm::parallel::PerThreadBumpPtrAllocator & getAllocatorRef()
Definition StringPool.h:39
StringPool(size_t InitialSize)
Definition StringPool.h:34
StringMapEntry< EmptyStringSetTag > StringEntry
StringEntry keeps data of the string: the length, external offset and a string body which is placed r...
Definition StringPool.h:23
PerThreadAllocator< BumpPtrAllocator > PerThreadBumpPtrAllocator
This is an optimization pass for GlobalISel generic memory operations.