52 E.second.Values.erase(
llvm::unique(E.second.Values), E.second.Values.end());
65 Buckets[Bucket].push_back(&E.second);
66 E.second.Sym = Asm->createTempSymbol(Prefix);
73 return LHS->HashValue <
RHS->HashValue;
80class AccelTableWriter {
88 const bool SkipIdenticalHashes;
90 void emitHashes()
const;
98 bool SkipIdenticalHashes)
99 : Asm(Asm), Contents(Contents), SkipIdenticalHashes(SkipIdenticalHashes) {
103class AppleAccelTableWriter :
public AccelTableWriter {
116 static const uint32_t MagicHash = 0x48415348;
119 : BucketCount(BucketCount), HashCount(UniqueHashCount),
120 HeaderDataLength(DataLength) {}
139 : DieOffsetBase(
Offset), Atoms(AtomList) {}
149 HeaderData HeaderData;
152 void emitBuckets()
const;
153 void emitData()
const;
158 : AccelTableWriter(
Asm, Contents,
true),
159 Header(Contents.getBucketCount(), Contents.getUniqueHashCount(),
160 8 + (Atoms.
size() * 4)),
161 HeaderData(Atoms), SecBegin(SecBegin) {}
175class Dwarf5AccelTableWriter :
public AccelTableWriter {
185 uint32_t AugmentationStringSize =
sizeof(AugmentationString);
186 char AugmentationString[8] = {
'L',
'L',
'V',
'M',
'0',
'7',
'0',
'0'};
191 : CompUnitCount(CompUnitCount), LocalTypeUnitCount(LocalTypeUnitCount),
192 ForeignTypeUnitCount(ForeignTypeUnitCount), BucketCount(BucketCount),
193 NameCount(NameCount) {}
195 void emit(Dwarf5AccelTableWriter &Ctx);
211 MCSymbol *ContributionEnd =
nullptr;
212 MCSymbol *AbbrevStart =
Asm->createTempSymbol(
"names_abbrev_start");
213 MCSymbol *AbbrevEnd =
Asm->createTempSymbol(
"names_abbrev_end");
214 MCSymbol *EntryPool =
Asm->createTempSymbol(
"names_entries");
216 bool IsSplitDwarf =
false;
220 void populateAbbrevsMap();
222 void emitCUList()
const;
223 void emitTUList()
const;
224 void emitBuckets()
const;
225 void emitStringOffsets()
const;
226 void emitAbbrevs()
const;
234 Dwarf5AccelTableWriter(
236 ArrayRef<std::variant<MCSymbol *, uint64_t>> CompUnits,
237 ArrayRef<std::variant<MCSymbol *, uint64_t>> TypeUnits,
242 ~Dwarf5AccelTableWriter() {
244 Abbrev->~DebugNamesAbbrev();
250void AccelTableWriter::emitHashes()
const {
251 uint64_t PrevHash = std::numeric_limits<uint64_t>::max();
252 unsigned BucketIdx = 0;
253 for (
const auto &Bucket : Contents.
getBuckets()) {
254 for (
const auto &Hash : Bucket) {
255 uint32_t HashValue = Hash->HashValue;
256 if (SkipIdenticalHashes && PrevHash == HashValue)
258 Asm->OutStreamer->AddComment(
"Hash in Bucket " +
Twine(BucketIdx));
259 Asm->emitInt32(HashValue);
260 PrevHash = HashValue;
266void AccelTableWriter::emitOffsets(
const MCSymbol *
Base)
const {
268 uint64_t PrevHash = std::numeric_limits<uint64_t>::max();
269 for (
size_t i = 0, e = Buckets.size(); i < e; ++i) {
270 for (
auto *Hash : Buckets[i]) {
271 uint32_t HashValue = Hash->HashValue;
272 if (SkipIdenticalHashes && PrevHash == HashValue)
274 PrevHash = HashValue;
275 Asm->OutStreamer->AddComment(
"Offset in Bucket " +
Twine(i));
276 Asm->emitLabelDifference(Hash->Sym,
Base,
Asm->getDwarfOffsetByteSize());
281void AppleAccelTableWriter::Header::emit(
AsmPrinter *Asm)
const {
282 Asm->OutStreamer->AddComment(
"Header Magic");
283 Asm->emitInt32(Magic);
284 Asm->OutStreamer->AddComment(
"Header Version");
286 Asm->OutStreamer->AddComment(
"Header Hash Function");
287 Asm->emitInt16(HashFunction);
288 Asm->OutStreamer->AddComment(
"Header Bucket Count");
289 Asm->emitInt32(BucketCount);
290 Asm->OutStreamer->AddComment(
"Header Hash Count");
291 Asm->emitInt32(HashCount);
292 Asm->OutStreamer->AddComment(
"Header Data Length");
293 Asm->emitInt32(HeaderDataLength);
296void AppleAccelTableWriter::HeaderData::emit(
AsmPrinter *Asm)
const {
297 Asm->OutStreamer->AddComment(
"HeaderData Die Offset Base");
298 Asm->emitInt32(DieOffsetBase);
299 Asm->OutStreamer->AddComment(
"HeaderData Atom Count");
302 for (
const Atom &
A : Atoms) {
304 Asm->emitInt16(
A.Type);
306 Asm->emitInt16(
A.Form);
310void AppleAccelTableWriter::emitBuckets()
const {
313 for (
size_t i = 0, e = Buckets.size(); i < e; ++i) {
314 Asm->OutStreamer->AddComment(
"Bucket " +
Twine(i));
315 if (!Buckets[i].empty())
316 Asm->emitInt32(index);
318 Asm->emitInt32(std::numeric_limits<uint32_t>::max());
321 uint64_t PrevHash = std::numeric_limits<uint64_t>::max();
322 for (
auto *HD : Buckets[i]) {
324 if (PrevHash != HashValue)
326 PrevHash = HashValue;
331void AppleAccelTableWriter::emitData()
const {
334 uint64_t PrevHash = std::numeric_limits<uint64_t>::max();
335 for (
const auto &Hash : Bucket) {
338 if (PrevHash != std::numeric_limits<uint64_t>::max() &&
339 PrevHash != Hash->HashValue)
342 Asm->OutStreamer->emitLabel(Hash->Sym);
343 Asm->OutStreamer->AddComment(Hash->Name.getString());
344 Asm->emitDwarfStringOffset(Hash->Name);
345 Asm->OutStreamer->AddComment(
"Num DIEs");
346 Asm->emitInt32(Hash->Values.size());
349 PrevHash = Hash->HashValue;
357void AppleAccelTableWriter::emit()
const {
359 HeaderData.emit(Asm);
362 emitOffsets(SecBegin);
369 : OffsetVal(&Die), DieTag(Die.
getTag()), AbbrevNumber(0), IsTU(IsTU),
372void Dwarf5AccelTableWriter::Header::emit(Dwarf5AccelTableWriter &Ctx) {
373 assert(CompUnitCount > 0 &&
"Index must have at least one CU.");
376 Ctx.ContributionEnd =
377 Asm->emitDwarfUnitLength(
"names",
"Header: unit length");
378 Asm->OutStreamer->AddComment(
"Header: version");
380 Asm->OutStreamer->AddComment(
"Header: padding");
381 Asm->emitInt16(Padding);
382 Asm->OutStreamer->AddComment(
"Header: compilation unit count");
383 Asm->emitInt32(CompUnitCount);
384 Asm->OutStreamer->AddComment(
"Header: local type unit count");
385 Asm->emitInt32(LocalTypeUnitCount);
386 Asm->OutStreamer->AddComment(
"Header: foreign type unit count");
387 Asm->emitInt32(ForeignTypeUnitCount);
388 Asm->OutStreamer->AddComment(
"Header: bucket count");
389 Asm->emitInt32(BucketCount);
390 Asm->OutStreamer->AddComment(
"Header: name count");
391 Asm->emitInt32(NameCount);
392 Asm->OutStreamer->AddComment(
"Header: abbreviation table size");
393 Asm->emitLabelDifference(Ctx.AbbrevEnd, Ctx.AbbrevStart,
sizeof(
uint32_t));
394 Asm->OutStreamer->AddComment(
"Header: augmentation string size");
395 assert(AugmentationStringSize % 4 == 0);
396 Asm->emitInt32(AugmentationStringSize);
397 Asm->OutStreamer->AddComment(
"Header: augmentation string");
398 Asm->OutStreamer->emitBytes({AugmentationString, AugmentationStringSize});
401std::optional<uint64_t>
404 Parent && !Parent->
findAttribute(dwarf::Attribute::DW_AT_declaration))
405 return Parent->getOffset();
409static std::optional<dwarf::Form>
411 std::optional<OffsetAndUnitID> ParentOffset) {
416 if (IndexedOffsets.
contains(*ParentOffset))
417 return dwarf::Form::DW_FORM_ref4;
419 return dwarf::Form::DW_FORM_flag_present;
425 ID.AddInteger(Enc.Index);
426 ID.AddInteger(Enc.Form);
430void Dwarf5AccelTableWriter::populateAbbrevsMap() {
432 for (
auto *Hash : Bucket) {
434 std::optional<DWARF5AccelTable::UnitIndexAndEncoding> EntryRet =
435 getIndexForEntry(*
Value);
437 IndexedOffsets,
Value->getParentDieOffsetAndUnitID());
440 Abbrev.addAttribute(EntryRet->Encoding);
441 Abbrev.addAttribute({dwarf::DW_IDX_die_offset, dwarf::DW_FORM_ref4});
443 Abbrev.addAttribute({dwarf::DW_IDX_parent, *MaybeParentForm});
449 Value->setAbbrevNumber(Existing->getNumber());
454 AbbreviationsVector.
push_back(NewAbbrev);
456 AbbreviationsSet.
InsertNode(NewAbbrev, InsertPos);
463void Dwarf5AccelTableWriter::emitCUList()
const {
465 Asm->OutStreamer->AddComment(
"Compilation unit " +
Twine(
CU.index()));
466 if (std::holds_alternative<MCSymbol *>(
CU.value()))
467 Asm->emitDwarfSymbolReference(std::get<MCSymbol *>(
CU.value()));
469 Asm->emitDwarfLengthOrOffset(std::get<uint64_t>(
CU.value()));
473void Dwarf5AccelTableWriter::emitTUList()
const {
474 for (
const auto &TU :
enumerate(TypeUnits)) {
475 Asm->OutStreamer->AddComment(
"Type unit " +
Twine(TU.index()));
476 if (std::holds_alternative<MCSymbol *>(TU.value()))
477 Asm->emitDwarfSymbolReference(std::get<MCSymbol *>(TU.value()));
478 else if (IsSplitDwarf)
479 Asm->emitInt64(std::get<uint64_t>(TU.value()));
481 Asm->emitDwarfLengthOrOffset(std::get<uint64_t>(TU.value()));
485void Dwarf5AccelTableWriter::emitBuckets()
const {
488 Asm->OutStreamer->AddComment(
"Bucket " +
Twine(Bucket.index()));
489 Asm->emitInt32(Bucket.value().empty() ? 0 :
Index);
490 Index += Bucket.value().size();
494void Dwarf5AccelTableWriter::emitStringOffsets()
const {
496 for (
auto *Hash : Bucket.value()) {
498 Asm->OutStreamer->AddComment(
"String in Bucket " +
Twine(Bucket.index()) +
499 ": " +
String.getString());
505void Dwarf5AccelTableWriter::emitAbbrevs()
const {
506 Asm->OutStreamer->emitLabel(AbbrevStart);
508 Asm->OutStreamer->AddComment(
"Abbrev code");
509 Asm->emitULEB128(Abbrev->getNumber());
511 Asm->emitULEB128(Abbrev->getDieTag());
513 Abbrev->getAttributes()) {
515 Asm->emitULEB128(AttrEnc.Form,
518 Asm->emitULEB128(0,
"End of abbrev");
519 Asm->emitULEB128(0,
"End of abbrev");
521 Asm->emitULEB128(0,
"End of abbrev list");
522 Asm->OutStreamer->emitLabel(AbbrevEnd);
525void Dwarf5AccelTableWriter::emitEntry(
529 unsigned AbbrevIndex =
Entry.getAbbrevNumber() - 1;
530 assert(AbbrevIndex < AbbreviationsVector.size() &&
531 "Entry abbrev index is outside of abbreviations vector range.");
533 std::optional<DWARF5AccelTable::UnitIndexAndEncoding> EntryRet =
534 getIndexForEntry(Entry);
535 std::optional<OffsetAndUnitID> MaybeParentOffset =
536 Entry.getParentDieOffsetAndUnitID();
538 DIEOffsetToAccelEntryLabel.
find(
Entry.getDieOffsetAndUnitID());
539 assert(EntrySymbolIt != DIEOffsetToAccelEntryLabel.
end());
540 MCSymbol *EntrySymbol = EntrySymbolIt->getSecond();
545 if (EmittedAccelEntrySymbols.
insert(EntrySymbol).second)
546 Asm->OutStreamer->emitLabel(EntrySymbol);
548 Asm->emitULEB128(
Entry.getAbbrevNumber(),
"Abbreviation code");
553 switch (AttrEnc.Index) {
554 case dwarf::DW_IDX_compile_unit:
555 case dwarf::DW_IDX_type_unit: {
557 ID.emitValue(Asm, AttrEnc.Form);
560 case dwarf::DW_IDX_die_offset:
561 assert(AttrEnc.Form == dwarf::DW_FORM_ref4);
562 Asm->emitInt32(
Entry.getDieOffset());
564 case dwarf::DW_IDX_parent: {
565 if (AttrEnc.Form == dwarf::Form::DW_FORM_flag_present)
567 auto ParentSymbolIt = DIEOffsetToAccelEntryLabel.
find(*MaybeParentOffset);
568 assert(ParentSymbolIt != DIEOffsetToAccelEntryLabel.
end());
569 Asm->emitLabelDifference(ParentSymbolIt->getSecond(), EntryPool, 4);
578void Dwarf5AccelTableWriter::emitData() {
582 DIEOffsetToAccelEntryLabel.
insert({
Offset,
Asm->createTempSymbol(
"")});
584 Asm->OutStreamer->emitLabel(EntryPool);
587 for (
auto *Hash : Bucket) {
589 Asm->OutStreamer->emitLabel(Hash->Sym);
591 emitEntry(*
Value, DIEOffsetToAccelEntryLabel, EmittedAccelEntrySymbols);
592 Asm->OutStreamer->AddComment(
"End of list: " + Hash->Name.getString());
598Dwarf5AccelTableWriter::Dwarf5AccelTableWriter(
600 ArrayRef<std::variant<MCSymbol *, uint64_t>> CompUnits,
601 ArrayRef<std::variant<MCSymbol *, uint64_t>> TypeUnits,
606 : AccelTableWriter(
Asm, Contents,
false),
607 Header(CompUnits.
size(), IsSplitDwarf ? 0 : TypeUnits.
size(),
608 IsSplitDwarf ? TypeUnits.
size() : 0, Contents.getBucketCount(),
609 Contents.getUniqueNameCount()),
610 CompUnits(CompUnits), TypeUnits(TypeUnits),
611 getIndexForEntry(
std::
move(getIndexForEntry)),
612 IsSplitDwarf(IsSplitDwarf) {
615 for (
auto *Hash : Bucket)
617 IndexedOffsets.insert(
Value->getDieOffsetAndUnitID());
619 populateAbbrevsMap();
622void Dwarf5AccelTableWriter::emit() {
629 emitOffsets(EntryPool);
632 Asm->OutStreamer->emitValueToAlignment(
Align(4), 0);
633 Asm->OutStreamer->emitLabel(ContributionEnd);
640 AppleAccelTableWriter(Asm, Contents, Atoms, SecBegin).emit();
645 ArrayRef<std::unique_ptr<DwarfCompileUnit>> CUs) {
647 std::vector<std::variant<MCSymbol *, uint64_t>> CompUnits;
648 std::vector<std::variant<MCSymbol *, uint64_t>> TypeUnits;
654 switch (
CU.value()->getCUNode()->getNameTableKind()) {
661 CUIndex[
CU.index()] = CUCount++;
662 assert(
CU.index() ==
CU.value()->getUniqueID());
668 for (
const auto &TU : TUSymbols) {
669 TUIndex[TU.UniqueID] = TUCount++;
671 TypeUnits.push_back(std::get<uint64_t>(TU.LabelOrSignature));
673 TypeUnits.push_back(std::get<MCSymbol *>(TU.LabelOrSignature));
676 if (CompUnits.empty())
679 Asm->OutStreamer->switchSection(
680 Asm->getObjFileLowering().getDwarfDebugNamesSection());
687 Dwarf5AccelTableWriter(
688 Asm, Contents, CompUnits, TypeUnits,
690 -> std::optional<DWARF5AccelTable::UnitIndexAndEncoding> {
692 return {{TUIndex[Entry.getUnitID()],
693 {dwarf::DW_IDX_type_unit, TUIndexForm}}};
694 if (CUIndex.
size() > 1)
695 return {{CUIndex[Entry.getUnitID()],
696 {dwarf::DW_IDX_compile_unit, CUIndexForm}}};
704 TUSymbolsOrHashes.
push_back({U.getLabelBegin(), U.getUniqueID()});
708 TUSymbolsOrHashes.
push_back({U.getTypeSignature(), U.getUniqueID()});
713 ArrayRef<std::variant<MCSymbol *, uint64_t>> CUs,
717 std::vector<std::variant<MCSymbol *, uint64_t>> TypeUnits;
719 Dwarf5AccelTableWriter(Asm, Contents, CUs, TypeUnits, getIndexForEntry,
false)
725 "The section offset exceeds the limit.");
731 "The section offset exceeds the limit.");
755void AppleAccelTableWriter::Header::print(
raw_ostream &
OS)
const {
756 OS <<
"Magic: " <<
format(
"0x%x", Magic) <<
"\n"
757 <<
"Version: " <<
Version <<
"\n"
758 <<
"Hash Function: " << HashFunction <<
"\n"
759 <<
"Bucket Count: " << BucketCount <<
"\n"
760 <<
"Header Data Length: " << HeaderDataLength <<
"\n";
768void AppleAccelTableWriter::HeaderData::print(
raw_ostream &
OS)
const {
769 OS <<
"DIE Offset Base: " << DieOffsetBase <<
"\n";
770 for (
auto Atom : Atoms)
776 HeaderData.print(
OS);
782 OS <<
"Name: " <<
Name.getString() <<
"\n";
783 OS <<
" Hash Value: " <<
format(
"0x%x", HashValue) <<
"\n";
790 for (
auto *
Value : Values)
797 for (
const auto &[
Name,
Data] : Entries) {
798 OS <<
"Name: " <<
Name <<
"\n";
799 for (
auto *V :
Data.Values)
803 OS <<
"Buckets and Hashes: \n";
804 for (
const auto &Bucket : Buckets)
805 for (
const auto &Hash : Bucket)
809 for (
const auto &E : Entries)
814 OS <<
" Offset: " << getDieOffset() <<
"\n";
819 OS <<
" Offset: " << Die.getOffset() <<
"\n";
823 OS <<
" Offset: " << Die.getOffset() <<
"\n";
828 OS <<
" Static Offset: " <<
Offset <<
"\n";
832 OS <<
" Static Offset: " <<
Offset <<
"\n";
833 OS <<
" QualifiedNameHash: " <<
format(
"%x\n", QualifiedNameHash) <<
"\n";
835 OS <<
" ObjCClassIsImplementation: "
836 << (ObjCClassIsImplementation ?
"true" :
"false");
static std::optional< dwarf::Form > getFormForIdxParent(const DenseSet< OffsetAndUnitID > &IndexedOffsets, std::optional< OffsetAndUnitID > ParentOffset)
This file contains support for writing accelerator tables.
static void print(raw_ostream &Out, object::Archive::Kind Kind, T Val)
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
This file defines the DenseSet and SmallDenseSet classes.
This file contains constants used for implementing Dwarf debug support.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
A base class holding non-template-dependant functionality of the AccelTable class.
std::vector< HashData * > HashList
void computeBucketCount()
void finalize(AsmPrinter *Asm, StringRef Prefix)
void print(raw_ostream &OS) const
ArrayRef< HashList > getBuckets() const
Interface which the different types of accelerator table data have to conform.
A base class for different implementations of Data classes for Apple Accelerator Tables.
void emit(AsmPrinter *Asm) const override
void print(raw_ostream &OS) const override
static constexpr Atom Atoms[]
static constexpr Atom Atoms[]
void emit(AsmPrinter *Asm) const override
void print(raw_ostream &OS) const override
uint32_t QualifiedNameHash
void emit(AsmPrinter *Asm) const override
void print(raw_ostream &OS) const override
bool ObjCClassIsImplementation
static constexpr Atom Atoms[]
void print(raw_ostream &OS) const override
void emit(AsmPrinter *Asm) const override
static constexpr Atom Atoms[]
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
This class is intended to be used as a driving class for all asm writers.
Allocate memory in an ever growing pool, as if by bump-pointer.
static dwarf::Form BestForm(bool IsSigned, uint64_t Int)
Choose the best form for integer.
A structured debug information entry.
DIEValue findAttribute(dwarf::Attribute Attribute) const
Find a value in the DIE with the attribute given.
uint64_t getDebugSectionOffset() const
Get the absolute offset within the .debug_info or .debug_types section for this DIE.
dwarf::Tag getTag() const
The Data class implementation for DWARF v5 accelerator table.
void print(raw_ostream &OS) const override
DWARF5AccelTableData(const DIE &Die, const uint32_t UnitID, const bool IsTU)
static std::optional< uint64_t > getDefiningParentDieOffset(const DIE &Die)
If Die has a non-null parent and the parent is not a declaration, return its offset.
void addTypeUnitSignature(DwarfTypeUnit &U)
Add a type unit Signature.
const TUVectorTy & getTypeUnitsSymbols()
Returns type units that were constructed.
void addTypeUnitSymbol(DwarfTypeUnit &U)
Add a type unit start symbol.
void setNumber(uint32_t AbbrevNumber)
Set abbreviation tag index.
const SmallVector< AttributeEncoding, 1 > & getAttributes() const
Returns attributes for an abbreviation.
void Profile(FoldingSetNodeID &ID) const
Used to gather unique data for the abbreviation folding set.
uint32_t getNumber() const
Get abbreviation tag index.
iterator find(const_arg_type_t< KeyT > Val)
std::pair< iterator, bool > insert(const std::pair< KeyT, ValueT > &KV)
Implements a dense probed hash-table based set.
Collects and handles dwarf debug information.
bool useSplitDwarf() const
Returns whether or not to change the current debug info for the split dwarf proposal support.
DwarfStringPoolEntryRef: Dwarf string pool entry reference.
MCSymbol * getLabelBegin() const
Get the the symbol for start of the section for this unit.
void InsertNode(T *N, void *InsertPos)
InsertNode - Insert the specified node into the folding set, knowing that it is not already in the fo...
T * FindNodeOrInsertPos(const FoldingSetNodeID &ID, void *&InsertPos)
FindNodeOrInsertPos - Look up the node specified by ID.
FoldingSetNodeID - This class is used to gather all the unique data bits of a node.
FoldingSet - This template class is used to instantiate a specialized implementation of the folding s...
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
void print(raw_ostream &OS, const MCAsmInfo *MAI) const
print - Print the value to the stream OS.
void reserve(size_type N)
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
constexpr const char * data() const
data - Get a pointer to the start of the string (which may not be null terminated).
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM Value Representation.
void print(raw_ostream &O, bool IsForDebug=false) const
Implement operator<< on Value.
std::pair< iterator, bool > insert(const ValueT &V)
bool contains(const_arg_type_t< ValueT > V) const
Check if the set contains the given element.
An efficient, type-erasing, non-owning reference to a callable.
This class implements an extremely fast bulk output stream that can only output to a stream.
StringRef FormEncodingString(unsigned Encoding)
StringRef IndexString(unsigned Idx)
StringRef AtomTypeString(unsigned Atom)
StringRef TagString(unsigned Tag)
unsigned getTag(StringRef TagString)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
uint32_t getDebugNamesBucketCount(uint32_t UniqueHashCount)
@ DW_FLAG_type_implementation
This is an optimization pass for GlobalISel generic memory operations.
void dump(const SparseBitVector< ElementSize > &LHS, raw_ostream &out)
void stable_sort(R &&Range)
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.
auto enumerate(FirstRange &&First, RestRanges &&...Rest)
Given two or more input ranges, returns a new range whose values are tuples (A, B,...
auto unique(Range &&R, Predicate P)
void emitAppleAccelTableImpl(AsmPrinter *Asm, AccelTableBase &Contents, StringRef Prefix, const MCSymbol *SecBegin, ArrayRef< AppleAccelTableData::Atom > Atoms)
void sort(IteratorTy Start, IteratorTy End)
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
format_object< Ts... > format(const char *Fmt, const Ts &... Vals)
These are helper functions used to produce formatted output.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
void emitDWARF5AccelTable(AsmPrinter *Asm, DWARF5AccelTable &Contents, const DwarfDebug &DD, ArrayRef< std::unique_ptr< DwarfCompileUnit > > CUs)
Implement std::hash so that hash_code can be used in STL containers.
Represents a group of entries with identical name (and hence, hash value).
void print(raw_ostream &OS) const
This struct is a compact representation of a valid (non-zero power of two) alignment.
An Atom defines the form of the data in an Apple accelerator table.
void print(raw_ostream &OS) const
Helper class to identify an entry in DWARF5AccelTable based on their DIE offset and UnitID.