LLVM 19.0.0git
StringEntryToDwarfStringPoolEntryMap.h
Go to the documentation of this file.
1//===- StringEntryToDwarfStringPoolEntryMap.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_LIB_DWARFLINKER_PARALLEL_STRINGENTRYTODWARFSTRINGPOOLENTRYMAP_H
10#define LLVM_LIB_DWARFLINKER_PARALLEL_STRINGENTRYTODWARFSTRINGPOOLENTRYMAP_H
11
15
16namespace llvm {
17namespace dwarf_linker {
18namespace parallel {
19
20/// This class creates a DwarfStringPoolEntry for the corresponding StringEntry.
22public:
26
27 /// Create DwarfStringPoolEntry for specified StringEntry if necessary.
28 /// Initialize DwarfStringPoolEntry with initial values.
31
32 if (it == DwarfStringPoolEntries.end()) {
36 DataPtr->String = String->getKey();
38 DataPtr->Offset = 0;
39 DataPtr->Symbol = nullptr;
40 it = DwarfStringPoolEntries.insert(std::make_pair(String, DataPtr)).first;
41 }
42
43 assert(it->second != nullptr);
44 return it->second;
45 }
46
47 /// Returns already existed DwarfStringPoolEntry for the specified
48 /// StringEntry.
53
55 assert(it->second != nullptr);
56 return it->second;
57 }
58
59 /// Erase contents of StringsForEmission.
61
62protected:
66
68};
69
70} // end of namespace parallel
71} // end of namespace dwarf_linker
72} // end of namespace llvm
73
74#endif // LLVM_LIB_DWARFLINKER_PARALLEL_STRINGENTRYTODWARFSTRINGPOOLENTRYMAP_H
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file defines the SmallVector class.
iterator find(const_arg_type_t< KeyT > Val)
Definition: DenseMap.h:155
iterator end()
Definition: DenseMap.h:84
std::pair< iterator, bool > insert(const std::pair< KeyT, ValueT > &KV)
Definition: DenseMap.h:220
StringMapEntry - This is used to represent one value that is inserted into a StringMap.
This class keeps data and services common for the whole linking process.
llvm::parallel::PerThreadBumpPtrAllocator & getAllocator()
Returns global per-thread allocator.
This class creates a DwarfStringPoolEntry for the corresponding StringEntry.
DwarfStringPoolEntryWithExtString * getExistingEntry(const StringEntry *String) const
Returns already existed DwarfStringPoolEntry for the specified StringEntry.
DwarfStringPoolEntryWithExtString * add(const StringEntry *String)
Create DwarfStringPoolEntry for specified StringEntry if necessary.
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
DwarfStringPoolEntry with string keeping externally.
static constexpr unsigned NotIndexed