51 E.second.Values.erase(
llvm::unique(E.second.Values), E.second.Values.end());
64 Buckets[Bucket].push_back(&E.second);
65 E.second.Sym = Asm->createTempSymbol(Prefix);
72 return LHS->HashValue <
RHS->HashValue;
79class AccelTableWriter {
87 const bool SkipIdenticalHashes;
89 void emitHashes()
const;
97 bool SkipIdenticalHashes)
98 : Asm(Asm), Contents(Contents), SkipIdenticalHashes(SkipIdenticalHashes) {
102class AppleAccelTableWriter :
public AccelTableWriter {
115 static const uint32_t MagicHash = 0x48415348;
118 : BucketCount(BucketCount), HashCount(UniqueHashCount),
119 HeaderDataLength(DataLength) {}
138 : DieOffsetBase(
Offset), Atoms(AtomList) {}
148 HeaderData HeaderData;
151 void emitBuckets()
const;
152 void emitData()
const;
157 : AccelTableWriter(
Asm, Contents,
true),
158 Header(Contents.getBucketCount(), Contents.getUniqueHashCount(),
159 8 + (Atoms.
size() * 4)),
160 HeaderData(Atoms), SecBegin(SecBegin) {}
174class Dwarf5AccelTableWriter :
public AccelTableWriter {
184 uint32_t AugmentationStringSize =
sizeof(AugmentationString);
185 char AugmentationString[8] = {
'L',
'L',
'V',
'M',
'0',
'7',
'0',
'0'};
190 : CompUnitCount(CompUnitCount), LocalTypeUnitCount(LocalTypeUnitCount),
191 ForeignTypeUnitCount(ForeignTypeUnitCount), BucketCount(BucketCount),
192 NameCount(NameCount) {}
194 void emit(Dwarf5AccelTableWriter &Ctx);
210 MCSymbol *ContributionEnd =
nullptr;
211 MCSymbol *AbbrevStart =
Asm->createTempSymbol(
"names_abbrev_start");
212 MCSymbol *AbbrevEnd =
Asm->createTempSymbol(
"names_abbrev_end");
213 MCSymbol *EntryPool =
Asm->createTempSymbol(
"names_entries");
215 bool IsSplitDwarf =
false;
219 void populateAbbrevsMap();
221 void emitCUList()
const;
222 void emitTUList()
const;
223 void emitBuckets()
const;
224 void emitStringOffsets()
const;
225 void emitAbbrevs()
const;
233 Dwarf5AccelTableWriter(
235 ArrayRef<std::variant<MCSymbol *, uint64_t>> CompUnits,
236 ArrayRef<std::variant<MCSymbol *, uint64_t>> TypeUnits,
241 ~Dwarf5AccelTableWriter() {
243 Abbrev->~DebugNamesAbbrev();
249void AccelTableWriter::emitHashes()
const {
250 uint64_t PrevHash = std::numeric_limits<uint64_t>::max();
251 unsigned BucketIdx = 0;
252 for (
const auto &Bucket : Contents.
getBuckets()) {
253 for (
const auto &Hash : Bucket) {
254 uint32_t HashValue = Hash->HashValue;
255 if (SkipIdenticalHashes && PrevHash == HashValue)
257 Asm->OutStreamer->AddComment(
"Hash in Bucket " +
Twine(BucketIdx));
258 Asm->emitInt32(HashValue);
259 PrevHash = HashValue;
265void AccelTableWriter::emitOffsets(
const MCSymbol *
Base)
const {
267 uint64_t PrevHash = std::numeric_limits<uint64_t>::max();
268 for (
size_t i = 0, e = Buckets.size(); i < e; ++i) {
269 for (
auto *Hash : Buckets[i]) {
270 uint32_t HashValue = Hash->HashValue;
271 if (SkipIdenticalHashes && PrevHash == HashValue)
273 PrevHash = HashValue;
274 Asm->OutStreamer->AddComment(
"Offset in Bucket " +
Twine(i));
275 Asm->emitLabelDifference(Hash->Sym,
Base,
Asm->getDwarfOffsetByteSize());
280void AppleAccelTableWriter::Header::emit(
AsmPrinter *Asm)
const {
281 Asm->OutStreamer->AddComment(
"Header Magic");
282 Asm->emitInt32(Magic);
283 Asm->OutStreamer->AddComment(
"Header Version");
285 Asm->OutStreamer->AddComment(
"Header Hash Function");
286 Asm->emitInt16(HashFunction);
287 Asm->OutStreamer->AddComment(
"Header Bucket Count");
288 Asm->emitInt32(BucketCount);
289 Asm->OutStreamer->AddComment(
"Header Hash Count");
290 Asm->emitInt32(HashCount);
291 Asm->OutStreamer->AddComment(
"Header Data Length");
292 Asm->emitInt32(HeaderDataLength);
295void AppleAccelTableWriter::HeaderData::emit(
AsmPrinter *Asm)
const {
296 Asm->OutStreamer->AddComment(
"HeaderData Die Offset Base");
297 Asm->emitInt32(DieOffsetBase);
298 Asm->OutStreamer->AddComment(
"HeaderData Atom Count");
301 for (
const Atom &
A : Atoms) {
303 Asm->emitInt16(
A.Type);
305 Asm->emitInt16(
A.Form);
309void AppleAccelTableWriter::emitBuckets()
const {
312 for (
size_t i = 0, e = Buckets.size(); i < e; ++i) {
313 Asm->OutStreamer->AddComment(
"Bucket " +
Twine(i));
314 if (!Buckets[i].empty())
315 Asm->emitInt32(index);
317 Asm->emitInt32(std::numeric_limits<uint32_t>::max());
320 uint64_t PrevHash = std::numeric_limits<uint64_t>::max();
321 for (
auto *HD : Buckets[i]) {
323 if (PrevHash != HashValue)
325 PrevHash = HashValue;
330void AppleAccelTableWriter::emitData()
const {
333 uint64_t PrevHash = std::numeric_limits<uint64_t>::max();
334 for (
const auto &Hash : Bucket) {
337 if (PrevHash != std::numeric_limits<uint64_t>::max() &&
338 PrevHash != Hash->HashValue)
341 Asm->OutStreamer->emitLabel(Hash->Sym);
342 Asm->OutStreamer->AddComment(Hash->Name.getString());
343 Asm->emitDwarfStringOffset(Hash->Name);
344 Asm->OutStreamer->AddComment(
"Num DIEs");
345 Asm->emitInt32(Hash->Values.size());
348 PrevHash = Hash->HashValue;
356void AppleAccelTableWriter::emit()
const {
358 HeaderData.emit(Asm);
361 emitOffsets(SecBegin);
368 : OffsetVal(&Die), DieTag(Die.
getTag()), AbbrevNumber(0), IsTU(IsTU),
371void Dwarf5AccelTableWriter::Header::emit(Dwarf5AccelTableWriter &Ctx) {
372 assert(CompUnitCount > 0 &&
"Index must have at least one CU.");
375 Ctx.ContributionEnd =
376 Asm->emitDwarfUnitLength(
"names",
"Header: unit length");
377 Asm->OutStreamer->AddComment(
"Header: version");
379 Asm->OutStreamer->AddComment(
"Header: padding");
380 Asm->emitInt16(Padding);
381 Asm->OutStreamer->AddComment(
"Header: compilation unit count");
382 Asm->emitInt32(CompUnitCount);
383 Asm->OutStreamer->AddComment(
"Header: local type unit count");
384 Asm->emitInt32(LocalTypeUnitCount);
385 Asm->OutStreamer->AddComment(
"Header: foreign type unit count");
386 Asm->emitInt32(ForeignTypeUnitCount);
387 Asm->OutStreamer->AddComment(
"Header: bucket count");
388 Asm->emitInt32(BucketCount);
389 Asm->OutStreamer->AddComment(
"Header: name count");
390 Asm->emitInt32(NameCount);
391 Asm->OutStreamer->AddComment(
"Header: abbreviation table size");
392 Asm->emitLabelDifference(Ctx.AbbrevEnd, Ctx.AbbrevStart,
sizeof(
uint32_t));
393 Asm->OutStreamer->AddComment(
"Header: augmentation string size");
394 assert(AugmentationStringSize % 4 == 0);
395 Asm->emitInt32(AugmentationStringSize);
396 Asm->OutStreamer->AddComment(
"Header: augmentation string");
397 Asm->OutStreamer->emitBytes({AugmentationString, AugmentationStringSize});
400std::optional<uint64_t>
403 Parent && !Parent->
findAttribute(dwarf::Attribute::DW_AT_declaration))
404 return Parent->getOffset();
408static std::optional<dwarf::Form>
410 std::optional<OffsetAndUnitID> ParentOffset) {
415 if (IndexedOffsets.
contains(*ParentOffset))
416 return dwarf::Form::DW_FORM_ref4;
418 return dwarf::Form::DW_FORM_flag_present;
424 ID.AddInteger(Enc.Index);
425 ID.AddInteger(Enc.Form);
429void Dwarf5AccelTableWriter::populateAbbrevsMap() {
431 for (
auto *Hash : Bucket) {
433 std::optional<DWARF5AccelTable::UnitIndexAndEncoding> EntryRet =
434 getIndexForEntry(*
Value);
436 IndexedOffsets,
Value->getParentDieOffsetAndUnitID());
439 Abbrev.addAttribute(EntryRet->Encoding);
440 Abbrev.addAttribute({dwarf::DW_IDX_die_offset, dwarf::DW_FORM_ref4});
442 Abbrev.addAttribute({dwarf::DW_IDX_parent, *MaybeParentForm});
448 Value->setAbbrevNumber(Existing->getNumber());
453 AbbreviationsVector.
push_back(NewAbbrev);
455 AbbreviationsSet.
InsertNode(NewAbbrev, InsertPos);
462void Dwarf5AccelTableWriter::emitCUList()
const {
464 Asm->OutStreamer->AddComment(
"Compilation unit " +
Twine(
CU.index()));
465 if (std::holds_alternative<MCSymbol *>(
CU.value()))
466 Asm->emitDwarfSymbolReference(std::get<MCSymbol *>(
CU.value()));
468 Asm->emitDwarfLengthOrOffset(std::get<uint64_t>(
CU.value()));
472void Dwarf5AccelTableWriter::emitTUList()
const {
473 for (
const auto &TU :
enumerate(TypeUnits)) {
474 Asm->OutStreamer->AddComment(
"Type unit " +
Twine(TU.index()));
475 if (std::holds_alternative<MCSymbol *>(TU.value()))
476 Asm->emitDwarfSymbolReference(std::get<MCSymbol *>(TU.value()));
477 else if (IsSplitDwarf)
478 Asm->emitInt64(std::get<uint64_t>(TU.value()));
480 Asm->emitDwarfLengthOrOffset(std::get<uint64_t>(TU.value()));
484void Dwarf5AccelTableWriter::emitBuckets()
const {
487 Asm->OutStreamer->AddComment(
"Bucket " +
Twine(Bucket.index()));
488 Asm->emitInt32(Bucket.value().empty() ? 0 : Index);
489 Index += Bucket.value().size();
493void Dwarf5AccelTableWriter::emitStringOffsets()
const {
495 for (
auto *Hash : Bucket.value()) {
497 Asm->OutStreamer->AddComment(
"String in Bucket " +
Twine(Bucket.index()) +
498 ": " +
String.getString());
504void Dwarf5AccelTableWriter::emitAbbrevs()
const {
505 Asm->OutStreamer->emitLabel(AbbrevStart);
507 Asm->OutStreamer->AddComment(
"Abbrev code");
508 Asm->emitULEB128(Abbrev->getNumber());
510 Asm->emitULEB128(Abbrev->getDieTag());
512 Abbrev->getAttributes()) {
514 Asm->emitULEB128(AttrEnc.Form,
517 Asm->emitULEB128(0,
"End of abbrev");
518 Asm->emitULEB128(0,
"End of abbrev");
520 Asm->emitULEB128(0,
"End of abbrev list");
521 Asm->OutStreamer->emitLabel(AbbrevEnd);
524void Dwarf5AccelTableWriter::emitEntry(
528 unsigned AbbrevIndex =
Entry.getAbbrevNumber() - 1;
529 assert(AbbrevIndex < AbbreviationsVector.size() &&
530 "Entry abbrev index is outside of abbreviations vector range.");
532 std::optional<DWARF5AccelTable::UnitIndexAndEncoding> EntryRet =
533 getIndexForEntry(Entry);
534 std::optional<OffsetAndUnitID> MaybeParentOffset =
535 Entry.getParentDieOffsetAndUnitID();
537 DIEOffsetToAccelEntryLabel.
find(
Entry.getDieOffsetAndUnitID());
538 assert(EntrySymbolIt != DIEOffsetToAccelEntryLabel.
end());
539 MCSymbol *EntrySymbol = EntrySymbolIt->getSecond();
544 if (EmittedAccelEntrySymbols.
insert(EntrySymbol).second)
545 Asm->OutStreamer->emitLabel(EntrySymbol);
547 Asm->emitULEB128(
Entry.getAbbrevNumber(),
"Abbreviation code");
552 switch (AttrEnc.Index) {
553 case dwarf::DW_IDX_compile_unit:
554 case dwarf::DW_IDX_type_unit: {
556 ID.emitValue(Asm, AttrEnc.Form);
559 case dwarf::DW_IDX_die_offset:
560 assert(AttrEnc.Form == dwarf::DW_FORM_ref4);
561 Asm->emitInt32(
Entry.getDieOffset());
563 case dwarf::DW_IDX_parent: {
564 if (AttrEnc.Form == dwarf::Form::DW_FORM_flag_present)
566 auto ParentSymbolIt = DIEOffsetToAccelEntryLabel.
find(*MaybeParentOffset);
567 assert(ParentSymbolIt != DIEOffsetToAccelEntryLabel.
end());
568 Asm->emitLabelDifference(ParentSymbolIt->getSecond(), EntryPool, 4);
577void Dwarf5AccelTableWriter::emitData() {
581 DIEOffsetToAccelEntryLabel.
insert({
Offset,
Asm->createTempSymbol(
"")});
583 Asm->OutStreamer->emitLabel(EntryPool);
586 for (
auto *Hash : Bucket) {
588 Asm->OutStreamer->emitLabel(Hash->Sym);
590 emitEntry(*
Value, DIEOffsetToAccelEntryLabel, EmittedAccelEntrySymbols);
591 Asm->OutStreamer->AddComment(
"End of list: " + Hash->Name.getString());
597Dwarf5AccelTableWriter::Dwarf5AccelTableWriter(
599 ArrayRef<std::variant<MCSymbol *, uint64_t>> CompUnits,
600 ArrayRef<std::variant<MCSymbol *, uint64_t>> TypeUnits,
605 : AccelTableWriter(
Asm, Contents,
false),
606 Header(CompUnits.
size(), IsSplitDwarf ? 0 : TypeUnits.
size(),
607 IsSplitDwarf ? TypeUnits.
size() : 0, Contents.getBucketCount(),
608 Contents.getUniqueNameCount()),
609 CompUnits(CompUnits), TypeUnits(TypeUnits),
610 getIndexForEntry(
std::
move(getIndexForEntry)),
611 IsSplitDwarf(IsSplitDwarf) {
614 for (
auto *Hash : Bucket)
616 IndexedOffsets.insert(
Value->getDieOffsetAndUnitID());
618 populateAbbrevsMap();
621void Dwarf5AccelTableWriter::emit() {
628 emitOffsets(EntryPool);
631 Asm->OutStreamer->emitValueToAlignment(
Align(4), 0);
632 Asm->OutStreamer->emitLabel(ContributionEnd);
639 AppleAccelTableWriter(Asm, Contents, Atoms, SecBegin).emit();
644 ArrayRef<std::unique_ptr<DwarfCompileUnit>> CUs) {
646 std::vector<std::variant<MCSymbol *, uint64_t>> CompUnits;
647 std::vector<std::variant<MCSymbol *, uint64_t>> TypeUnits;
653 switch (
CU.value()->getCUNode()->getNameTableKind()) {
660 CUIndex[
CU.index()] = CUCount++;
661 assert(
CU.index() ==
CU.value()->getUniqueID());
667 for (
const auto &TU : TUSymbols) {
668 TUIndex[TU.UniqueID] = TUCount++;
670 TypeUnits.push_back(std::get<uint64_t>(TU.LabelOrSignature));
672 TypeUnits.push_back(std::get<MCSymbol *>(TU.LabelOrSignature));
675 if (CompUnits.empty())
678 Asm->OutStreamer->switchSection(
679 Asm->getObjFileLowering().getDwarfDebugNamesSection());
686 Dwarf5AccelTableWriter(
687 Asm, Contents, CompUnits, TypeUnits,
689 -> std::optional<DWARF5AccelTable::UnitIndexAndEncoding> {
691 return {{TUIndex[Entry.getUnitID()],
692 {dwarf::DW_IDX_type_unit, TUIndexForm}}};
693 if (CUIndex.
size() > 1)
694 return {{CUIndex[Entry.getUnitID()],
695 {dwarf::DW_IDX_compile_unit, CUIndexForm}}};
703 TUSymbolsOrHashes.
push_back({U.getLabelBegin(), U.getUniqueID()});
707 TUSymbolsOrHashes.
push_back({U.getTypeSignature(), U.getUniqueID()});
712 ArrayRef<std::variant<MCSymbol *, uint64_t>> CUs,
716 std::vector<std::variant<MCSymbol *, uint64_t>> TypeUnits;
718 Dwarf5AccelTableWriter(Asm, Contents, CUs, TypeUnits, getIndexForEntry,
false)
724 "The section offset exceeds the limit.");
730 "The section offset exceeds the limit.");
754void AppleAccelTableWriter::Header::print(
raw_ostream &
OS)
const {
755 OS <<
"Magic: " <<
format(
"0x%x", Magic) <<
"\n"
756 <<
"Version: " <<
Version <<
"\n"
757 <<
"Hash Function: " << HashFunction <<
"\n"
758 <<
"Bucket Count: " << BucketCount <<
"\n"
759 <<
"Header Data Length: " << HeaderDataLength <<
"\n";
767void AppleAccelTableWriter::HeaderData::print(
raw_ostream &
OS)
const {
768 OS <<
"DIE Offset Base: " << DieOffsetBase <<
"\n";
769 for (
auto Atom : Atoms)
775 HeaderData.print(
OS);
781 OS <<
"Name: " <<
Name.getString() <<
"\n";
782 OS <<
" Hash Value: " <<
format(
"0x%x", HashValue) <<
"\n";
789 for (
auto *
Value : Values)
796 for (
const auto &[
Name,
Data] : Entries) {
797 OS <<
"Name: " <<
Name <<
"\n";
798 for (
auto *V :
Data.Values)
802 OS <<
"Buckets and Hashes: \n";
803 for (
const auto &Bucket : Buckets)
804 for (
const auto &Hash : Bucket)
808 for (
const auto &E : Entries)
813 OS <<
" Offset: " << getDieOffset() <<
"\n";
818 OS <<
" Offset: " << Die.getOffset() <<
"\n";
822 OS <<
" Offset: " << Die.getOffset() <<
"\n";
827 OS <<
" Static Offset: " <<
Offset <<
"\n";
831 OS <<
" Static Offset: " <<
Offset <<
"\n";
832 OS <<
" QualifiedNameHash: " <<
format(
"%x\n", QualifiedNameHash) <<
"\n";
834 OS <<
" ObjCClassIsImplementation: "
835 << (ObjCClassIsImplementation ?
"true" :
"false");
static std::optional< unsigned > getTag(const TargetRegisterInfo *TRI, const MachineInstr &MI, const LoadInfo &LI)
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)
#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.
const uint16_t Form
DWARF Form.
void print(raw_ostream &OS) const
Helper class to identify an entry in DWARF5AccelTable based on their DIE offset and UnitID.