mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-28 03:25:23 +00:00
Constify AsmPrinter passed to DIE methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231209 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -60,7 +60,7 @@ void DIEAbbrev::Profile(FoldingSetNodeID &ID) const {
|
||||
|
||||
/// Emit - Print the abbreviation using the specified asm printer.
|
||||
///
|
||||
void DIEAbbrev::Emit(AsmPrinter *AP) const {
|
||||
void DIEAbbrev::Emit(const AsmPrinter *AP) const {
|
||||
// Emit its Dwarf tag type.
|
||||
AP->EmitULEB128(Tag, dwarf::TagString(Tag));
|
||||
|
||||
@@ -204,7 +204,7 @@ void DIEValue::dump() const {
|
||||
|
||||
/// EmitValue - Emit integer of appropriate size.
|
||||
///
|
||||
void DIEInteger::EmitValue(AsmPrinter *Asm, dwarf::Form Form) const {
|
||||
void DIEInteger::EmitValue(const AsmPrinter *Asm, dwarf::Form Form) const {
|
||||
unsigned Size = ~0U;
|
||||
switch (Form) {
|
||||
case dwarf::DW_FORM_flag_present:
|
||||
@@ -236,7 +236,7 @@ void DIEInteger::EmitValue(AsmPrinter *Asm, dwarf::Form Form) const {
|
||||
|
||||
/// SizeOf - Determine size of integer value in bytes.
|
||||
///
|
||||
unsigned DIEInteger::SizeOf(AsmPrinter *AP, dwarf::Form Form) const {
|
||||
unsigned DIEInteger::SizeOf(const AsmPrinter *AP, dwarf::Form Form) const {
|
||||
switch (Form) {
|
||||
case dwarf::DW_FORM_flag_present: return 0;
|
||||
case dwarf::DW_FORM_flag: // Fall thru
|
||||
@@ -272,13 +272,13 @@ void DIEInteger::print(raw_ostream &O) const {
|
||||
|
||||
/// EmitValue - Emit expression value.
|
||||
///
|
||||
void DIEExpr::EmitValue(AsmPrinter *AP, dwarf::Form Form) const {
|
||||
void DIEExpr::EmitValue(const AsmPrinter *AP, dwarf::Form Form) const {
|
||||
AP->OutStreamer.EmitValue(Expr, SizeOf(AP, Form));
|
||||
}
|
||||
|
||||
/// SizeOf - Determine size of expression value in bytes.
|
||||
///
|
||||
unsigned DIEExpr::SizeOf(AsmPrinter *AP, dwarf::Form Form) const {
|
||||
unsigned DIEExpr::SizeOf(const AsmPrinter *AP, dwarf::Form Form) const {
|
||||
if (Form == dwarf::DW_FORM_data4) return 4;
|
||||
if (Form == dwarf::DW_FORM_sec_offset) return 4;
|
||||
if (Form == dwarf::DW_FORM_strp) return 4;
|
||||
@@ -298,7 +298,7 @@ void DIEExpr::print(raw_ostream &O) const {
|
||||
|
||||
/// EmitValue - Emit label value.
|
||||
///
|
||||
void DIELabel::EmitValue(AsmPrinter *AP, dwarf::Form Form) const {
|
||||
void DIELabel::EmitValue(const AsmPrinter *AP, dwarf::Form Form) const {
|
||||
AP->EmitLabelReference(Label, SizeOf(AP, Form),
|
||||
Form == dwarf::DW_FORM_strp ||
|
||||
Form == dwarf::DW_FORM_sec_offset ||
|
||||
@@ -307,7 +307,7 @@ void DIELabel::EmitValue(AsmPrinter *AP, dwarf::Form Form) const {
|
||||
|
||||
/// SizeOf - Determine size of label value in bytes.
|
||||
///
|
||||
unsigned DIELabel::SizeOf(AsmPrinter *AP, dwarf::Form Form) const {
|
||||
unsigned DIELabel::SizeOf(const AsmPrinter *AP, dwarf::Form Form) const {
|
||||
if (Form == dwarf::DW_FORM_data4) return 4;
|
||||
if (Form == dwarf::DW_FORM_sec_offset) return 4;
|
||||
if (Form == dwarf::DW_FORM_strp) return 4;
|
||||
@@ -326,13 +326,13 @@ void DIELabel::print(raw_ostream &O) const {
|
||||
|
||||
/// EmitValue - Emit delta value.
|
||||
///
|
||||
void DIEDelta::EmitValue(AsmPrinter *AP, dwarf::Form Form) const {
|
||||
void DIEDelta::EmitValue(const AsmPrinter *AP, dwarf::Form Form) const {
|
||||
AP->EmitLabelDifference(LabelHi, LabelLo, SizeOf(AP, Form));
|
||||
}
|
||||
|
||||
/// SizeOf - Determine size of delta value in bytes.
|
||||
///
|
||||
unsigned DIEDelta::SizeOf(AsmPrinter *AP, dwarf::Form Form) const {
|
||||
unsigned DIEDelta::SizeOf(const AsmPrinter *AP, dwarf::Form Form) const {
|
||||
if (Form == dwarf::DW_FORM_data4) return 4;
|
||||
if (Form == dwarf::DW_FORM_sec_offset) return 4;
|
||||
if (Form == dwarf::DW_FORM_strp) return 4;
|
||||
@@ -351,13 +351,13 @@ void DIEDelta::print(raw_ostream &O) const {
|
||||
|
||||
/// EmitValue - Emit string value.
|
||||
///
|
||||
void DIEString::EmitValue(AsmPrinter *AP, dwarf::Form Form) const {
|
||||
void DIEString::EmitValue(const AsmPrinter *AP, dwarf::Form Form) const {
|
||||
Access->EmitValue(AP, Form);
|
||||
}
|
||||
|
||||
/// SizeOf - Determine size of delta value in bytes.
|
||||
///
|
||||
unsigned DIEString::SizeOf(AsmPrinter *AP, dwarf::Form Form) const {
|
||||
unsigned DIEString::SizeOf(const AsmPrinter *AP, dwarf::Form Form) const {
|
||||
return Access->SizeOf(AP, Form);
|
||||
}
|
||||
|
||||
@@ -397,7 +397,7 @@ static void emitLabelOffsetDifference(MCStreamer &Streamer, const MCSymbol *Hi,
|
||||
|
||||
/// EmitValue - Emit debug information entry offset.
|
||||
///
|
||||
void DIEEntry::EmitValue(AsmPrinter *AP, dwarf::Form Form) const {
|
||||
void DIEEntry::EmitValue(const AsmPrinter *AP, dwarf::Form Form) const {
|
||||
|
||||
if (Form == dwarf::DW_FORM_ref_addr) {
|
||||
const DwarfDebug *DD = AP->getDwarfDebug();
|
||||
@@ -420,7 +420,7 @@ void DIEEntry::EmitValue(AsmPrinter *AP, dwarf::Form Form) const {
|
||||
AP->EmitInt32(Entry.getOffset());
|
||||
}
|
||||
|
||||
unsigned DIEEntry::getRefAddrSize(AsmPrinter *AP) {
|
||||
unsigned DIEEntry::getRefAddrSize(const AsmPrinter *AP) {
|
||||
// DWARF4: References that use the attribute form DW_FORM_ref_addr are
|
||||
// specified to be four bytes in the DWARF 32-bit format and eight bytes
|
||||
// in the DWARF 64-bit format, while DWARF Version 2 specifies that such
|
||||
@@ -441,7 +441,7 @@ void DIEEntry::print(raw_ostream &O) const {
|
||||
//===----------------------------------------------------------------------===//
|
||||
// DIETypeSignature Implementation
|
||||
//===----------------------------------------------------------------------===//
|
||||
void DIETypeSignature::EmitValue(AsmPrinter *Asm, dwarf::Form Form) const {
|
||||
void DIETypeSignature::EmitValue(const AsmPrinter *Asm, dwarf::Form Form) const {
|
||||
assert(Form == dwarf::DW_FORM_ref_sig8);
|
||||
Asm->OutStreamer.EmitIntValue(Unit.getTypeSignature(), 8);
|
||||
}
|
||||
@@ -460,7 +460,7 @@ void DIETypeSignature::dump() const { print(dbgs()); }
|
||||
|
||||
/// ComputeSize - calculate the size of the location expression.
|
||||
///
|
||||
unsigned DIELoc::ComputeSize(AsmPrinter *AP) const {
|
||||
unsigned DIELoc::ComputeSize(const AsmPrinter *AP) const {
|
||||
if (!Size) {
|
||||
const SmallVectorImpl<DIEAbbrevData> &AbbrevData = Abbrev.getData();
|
||||
for (unsigned i = 0, N = Values.size(); i < N; ++i)
|
||||
@@ -472,7 +472,7 @@ unsigned DIELoc::ComputeSize(AsmPrinter *AP) const {
|
||||
|
||||
/// EmitValue - Emit location data.
|
||||
///
|
||||
void DIELoc::EmitValue(AsmPrinter *Asm, dwarf::Form Form) const {
|
||||
void DIELoc::EmitValue(const AsmPrinter *Asm, dwarf::Form Form) const {
|
||||
switch (Form) {
|
||||
default: llvm_unreachable("Improper form for block");
|
||||
case dwarf::DW_FORM_block1: Asm->EmitInt8(Size); break;
|
||||
@@ -490,7 +490,7 @@ void DIELoc::EmitValue(AsmPrinter *Asm, dwarf::Form Form) const {
|
||||
|
||||
/// SizeOf - Determine size of location data in bytes.
|
||||
///
|
||||
unsigned DIELoc::SizeOf(AsmPrinter *AP, dwarf::Form Form) const {
|
||||
unsigned DIELoc::SizeOf(const AsmPrinter *AP, dwarf::Form Form) const {
|
||||
switch (Form) {
|
||||
case dwarf::DW_FORM_block1: return Size + sizeof(int8_t);
|
||||
case dwarf::DW_FORM_block2: return Size + sizeof(int16_t);
|
||||
@@ -515,7 +515,7 @@ void DIELoc::print(raw_ostream &O) const {
|
||||
|
||||
/// ComputeSize - calculate the size of the block.
|
||||
///
|
||||
unsigned DIEBlock::ComputeSize(AsmPrinter *AP) const {
|
||||
unsigned DIEBlock::ComputeSize(const AsmPrinter *AP) const {
|
||||
if (!Size) {
|
||||
const SmallVectorImpl<DIEAbbrevData> &AbbrevData = Abbrev.getData();
|
||||
for (unsigned i = 0, N = Values.size(); i < N; ++i)
|
||||
@@ -527,7 +527,7 @@ unsigned DIEBlock::ComputeSize(AsmPrinter *AP) const {
|
||||
|
||||
/// EmitValue - Emit block data.
|
||||
///
|
||||
void DIEBlock::EmitValue(AsmPrinter *Asm, dwarf::Form Form) const {
|
||||
void DIEBlock::EmitValue(const AsmPrinter *Asm, dwarf::Form Form) const {
|
||||
switch (Form) {
|
||||
default: llvm_unreachable("Improper form for block");
|
||||
case dwarf::DW_FORM_block1: Asm->EmitInt8(Size); break;
|
||||
@@ -543,7 +543,7 @@ void DIEBlock::EmitValue(AsmPrinter *Asm, dwarf::Form Form) const {
|
||||
|
||||
/// SizeOf - Determine size of block data in bytes.
|
||||
///
|
||||
unsigned DIEBlock::SizeOf(AsmPrinter *AP, dwarf::Form Form) const {
|
||||
unsigned DIEBlock::SizeOf(const AsmPrinter *AP, dwarf::Form Form) const {
|
||||
switch (Form) {
|
||||
case dwarf::DW_FORM_block1: return Size + sizeof(int8_t);
|
||||
case dwarf::DW_FORM_block2: return Size + sizeof(int16_t);
|
||||
@@ -564,7 +564,7 @@ void DIEBlock::print(raw_ostream &O) const {
|
||||
// DIELocList Implementation
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
unsigned DIELocList::SizeOf(AsmPrinter *AP, dwarf::Form Form) const {
|
||||
unsigned DIELocList::SizeOf(const AsmPrinter *AP, dwarf::Form Form) const {
|
||||
if (Form == dwarf::DW_FORM_data4)
|
||||
return 4;
|
||||
if (Form == dwarf::DW_FORM_sec_offset)
|
||||
@@ -574,7 +574,7 @@ unsigned DIELocList::SizeOf(AsmPrinter *AP, dwarf::Form Form) const {
|
||||
|
||||
/// EmitValue - Emit label value.
|
||||
///
|
||||
void DIELocList::EmitValue(AsmPrinter *AP, dwarf::Form Form) const {
|
||||
void DIELocList::EmitValue(const AsmPrinter *AP, dwarf::Form Form) const {
|
||||
DwarfDebug *DD = AP->getDwarfDebug();
|
||||
MCSymbol *Label = DD->getDebugLocEntries()[Index].Label;
|
||||
|
||||
|
Reference in New Issue
Block a user