mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
DwarfDebug: Change Abbreviations member from pointer to reference
llvm-svn: 193699
This commit is contained in:
parent
80500b8f5b
commit
8f9b0650cf
@ -183,10 +183,10 @@ DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M)
|
||||
AbbreviationsSet(InitAbbreviationsSetSize),
|
||||
SourceIdMap(DIEValueAllocator),
|
||||
PrevLabel(NULL), GlobalCUIndexCount(0),
|
||||
InfoHolder(A, &AbbreviationsSet, &Abbreviations, "info_string",
|
||||
InfoHolder(A, &AbbreviationsSet, Abbreviations, "info_string",
|
||||
DIEValueAllocator),
|
||||
SkeletonAbbrevSet(InitAbbreviationsSetSize),
|
||||
SkeletonHolder(A, &SkeletonAbbrevSet, &SkeletonAbbrevs, "skel_string",
|
||||
SkeletonHolder(A, &SkeletonAbbrevSet, SkeletonAbbrevs, "skel_string",
|
||||
DIEValueAllocator) {
|
||||
|
||||
DwarfInfoSectionSym = DwarfAbbrevSectionSym = 0;
|
||||
@ -279,10 +279,10 @@ void DwarfUnits::assignAbbrevNumber(DIEAbbrev &Abbrev) {
|
||||
// If it's newly added.
|
||||
if (InSet == &Abbrev) {
|
||||
// Add to abbreviation list.
|
||||
Abbreviations->push_back(&Abbrev);
|
||||
Abbreviations.push_back(&Abbrev);
|
||||
|
||||
// Assign the vector position + 1 as its number.
|
||||
Abbrev.setNumber(Abbreviations->size());
|
||||
Abbrev.setNumber(Abbreviations.size());
|
||||
} else {
|
||||
// Assign existing abbreviation number.
|
||||
Abbrev.setNumber(InSet->getNumber());
|
||||
@ -1928,7 +1928,7 @@ DwarfUnits::computeSizeAndOffset(DIE *Die, unsigned Offset) {
|
||||
|
||||
// Get the abbreviation for this DIE.
|
||||
unsigned AbbrevNumber = Die->getAbbrevNumber();
|
||||
const DIEAbbrev *Abbrev = Abbreviations->at(AbbrevNumber - 1);
|
||||
const DIEAbbrev *Abbrev = Abbreviations[AbbrevNumber - 1];
|
||||
|
||||
// Set DIE offset
|
||||
Die->setOffset(Offset);
|
||||
@ -2035,10 +2035,10 @@ void DwarfDebug::emitSectionLabels() {
|
||||
}
|
||||
|
||||
// Recursively emits a debug information entry.
|
||||
void DwarfDebug::emitDIE(DIE *Die, std::vector<DIEAbbrev *> *Abbrevs) {
|
||||
void DwarfDebug::emitDIE(DIE *Die, ArrayRef<DIEAbbrev *> Abbrevs) {
|
||||
// Get the abbreviation for this DIE.
|
||||
unsigned AbbrevNumber = Die->getAbbrevNumber();
|
||||
const DIEAbbrev *Abbrev = Abbrevs->at(AbbrevNumber - 1);
|
||||
const DIEAbbrev *Abbrev = Abbrevs[AbbrevNumber - 1];
|
||||
|
||||
// Emit the code (index) for the abbreviation.
|
||||
if (Asm->isVerbose())
|
||||
|
@ -226,7 +226,7 @@ class DwarfUnits {
|
||||
FoldingSet<DIEAbbrev> *AbbreviationsSet;
|
||||
|
||||
// A list of all the unique abbreviations in use.
|
||||
std::vector<DIEAbbrev *> *Abbreviations;
|
||||
std::vector<DIEAbbrev *> &Abbreviations;
|
||||
|
||||
// A pointer to all units in the section.
|
||||
SmallVector<CompileUnit *, 1> CUs;
|
||||
@ -249,7 +249,7 @@ class DwarfUnits {
|
||||
|
||||
public:
|
||||
DwarfUnits(AsmPrinter *AP, FoldingSet<DIEAbbrev> *AS,
|
||||
std::vector<DIEAbbrev *> *A, const char *Pref,
|
||||
std::vector<DIEAbbrev *> &A, const char *Pref,
|
||||
BumpPtrAllocator &DA)
|
||||
: Asm(AP), AbbreviationsSet(AS), Abbreviations(A), StringPool(DA),
|
||||
NextStringPoolNumber(0), StringPref(Pref), AddressPool(),
|
||||
@ -699,7 +699,7 @@ public:
|
||||
unsigned CUID);
|
||||
|
||||
/// \brief Recursively Emits a debug information entry.
|
||||
void emitDIE(DIE *Die, std::vector<DIEAbbrev *> *Abbrevs);
|
||||
void emitDIE(DIE *Die, ArrayRef<DIEAbbrev *> Abbrevs);
|
||||
|
||||
// Experimental DWARF5 features.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user