mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
Make DotDebugLocEntry a class, reorder the members along with comments
for them and update all uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185588 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -2440,9 +2440,9 @@ void DwarfDebug::emitDebugLoc() {
|
||||
Asm->OutStreamer.EmitIntValue(0, Size);
|
||||
Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("debug_loc", index));
|
||||
} else {
|
||||
Asm->OutStreamer.EmitSymbolValue(Entry.Begin, Size);
|
||||
Asm->OutStreamer.EmitSymbolValue(Entry.End, Size);
|
||||
DIVariable DV(Entry.Variable);
|
||||
Asm->OutStreamer.EmitSymbolValue(Entry.getBeginSym(), Size);
|
||||
Asm->OutStreamer.EmitSymbolValue(Entry.getEndSym(), Size);
|
||||
DIVariable DV(Entry.getVariable());
|
||||
Asm->OutStreamer.AddComment("Loc expr size");
|
||||
MCSymbol *begin = Asm->OutStreamer.getContext().CreateTempSymbol();
|
||||
MCSymbol *end = Asm->OutStreamer.getContext().CreateTempSymbol();
|
||||
@ -2464,15 +2464,15 @@ void DwarfDebug::emitDebugLoc() {
|
||||
} else if (Entry.isLocation()) {
|
||||
if (!DV.hasComplexAddress())
|
||||
// Regular entry.
|
||||
Asm->EmitDwarfRegOp(Entry.Loc, DV.isIndirect());
|
||||
Asm->EmitDwarfRegOp(Entry.getLoc(), DV.isIndirect());
|
||||
else {
|
||||
// Complex address entry.
|
||||
unsigned N = DV.getNumAddrElements();
|
||||
unsigned i = 0;
|
||||
if (N >= 2 && DV.getAddrElement(0) == DIBuilder::OpPlus) {
|
||||
if (Entry.Loc.getOffset()) {
|
||||
if (Entry.getLoc().getOffset()) {
|
||||
i = 2;
|
||||
Asm->EmitDwarfRegOp(Entry.Loc, DV.isIndirect());
|
||||
Asm->EmitDwarfRegOp(Entry.getLoc(), DV.isIndirect());
|
||||
Asm->OutStreamer.AddComment("DW_OP_deref");
|
||||
Asm->EmitInt8(dwarf::DW_OP_deref);
|
||||
Asm->OutStreamer.AddComment("DW_OP_plus_uconst");
|
||||
@ -2481,12 +2481,12 @@ void DwarfDebug::emitDebugLoc() {
|
||||
} else {
|
||||
// If first address element is OpPlus then emit
|
||||
// DW_OP_breg + Offset instead of DW_OP_reg + Offset.
|
||||
MachineLocation Loc(Entry.Loc.getReg(), DV.getAddrElement(1));
|
||||
MachineLocation Loc(Entry.getLoc().getReg(), DV.getAddrElement(1));
|
||||
Asm->EmitDwarfRegOp(Loc, DV.isIndirect());
|
||||
i = 2;
|
||||
}
|
||||
} else {
|
||||
Asm->EmitDwarfRegOp(Entry.Loc, DV.isIndirect());
|
||||
Asm->EmitDwarfRegOp(Entry.getLoc(), DV.isIndirect());
|
||||
}
|
||||
|
||||
// Emit remaining complex address elements.
|
||||
@ -2496,7 +2496,7 @@ void DwarfDebug::emitDebugLoc() {
|
||||
Asm->EmitInt8(dwarf::DW_OP_plus_uconst);
|
||||
Asm->EmitULEB128(DV.getAddrElement(++i));
|
||||
} else if (Element == DIBuilder::OpDeref) {
|
||||
if (!Entry.Loc.isReg())
|
||||
if (!Entry.getLoc().isReg())
|
||||
Asm->EmitInt8(dwarf::DW_OP_deref);
|
||||
} else
|
||||
llvm_unreachable("unknown Opcode found in complex address");
|
||||
|
Reference in New Issue
Block a user