Use MachineInstr as an processDebugLoc() argument.

This will allow processDebugLoc() to handle scopes for DWARF debug info. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83183 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2009-09-30 23:12:50 +00:00
parent 3d910835fc
commit b0fdedb3fd
14 changed files with 15 additions and 15 deletions

View File

@ -358,7 +358,7 @@ namespace llvm {
/// processDebugLoc - Processes the debug information of each machine
/// instruction's DebugLoc.
void processDebugLoc(DebugLoc DL);
void processDebugLoc(const MachineInstr *MI);
/// printInlineAsm - This method formats and prints the specified machine
/// instruction that is an inline asm.

View File

@ -1347,10 +1347,10 @@ void AsmPrinter::PrintSpecial(const MachineInstr *MI, const char *Code) const {
/// processDebugLoc - Processes the debug information of each machine
/// instruction's DebugLoc.
void AsmPrinter::processDebugLoc(DebugLoc DL) {
void AsmPrinter::processDebugLoc(const MachineInstr *MI) {
if (!MAI || !DW)
return;
DebugLoc DL = MI->getDebugLoc();
if (MAI->doesSupportDebugInformation() && DW->ShouldEmitDwarfDebug()) {
if (!DL.isUnknown()) {
DebugLocTuple CurDLT = MF->getDebugLocTuple(DL);

View File

@ -1036,7 +1036,7 @@ void ARMAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
}}
// Call the autogenerated instruction printer routines.
processDebugLoc(MI->getDebugLoc());
processDebugLoc(MI);
printInstruction(MI);
if (VerboseAsm && !MI->getDebugLoc().isUnknown())
EmitComments(*MI);

View File

@ -177,7 +177,7 @@ bool AlphaAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
II != E; ++II) {
// Print the assembly for the instruction.
++EmittedInsts;
processDebugLoc(II->getDebugLoc());
processDebugLoc(II);
printInstruction(II);

View File

@ -146,7 +146,7 @@ bool BlackfinAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
II != E; ++II) {
// Print the assembly for the instruction.
processDebugLoc(II->getDebugLoc());
processDebugLoc(II);
printInstruction(II);
if (VerboseAsm && !II->getDebugLoc().isUnknown())

View File

@ -405,7 +405,7 @@ bool SPUAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI,
///
void SPUAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
++EmittedInsts;
processDebugLoc(MI->getDebugLoc());
processDebugLoc(MI);
printInstruction(MI);
if (VerboseAsm && !MI->getDebugLoc().isUnknown())

View File

@ -148,7 +148,7 @@ bool MSP430AsmPrinter::runOnMachineFunction(MachineFunction &MF) {
void MSP430AsmPrinter::printMachineInstruction(const MachineInstr *MI) {
++EmittedInsts;
processDebugLoc(MI->getDebugLoc());
processDebugLoc(MI);
// Call the autogenerated instruction printer routines.
printInstruction(MI);

View File

@ -278,7 +278,7 @@ bool MipsAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
II != E; ++II) {
processDebugLoc(II->getDebugLoc());
processDebugLoc(II);
// Print the assembly for the instruction.
printInstruction(II);

View File

@ -43,7 +43,7 @@ PIC16AsmPrinter::PIC16AsmPrinter(formatted_raw_ostream &O, TargetMachine &TM,
}
bool PIC16AsmPrinter::printMachineInstruction(const MachineInstr *MI) {
processDebugLoc(MI->getDebugLoc());
processDebugLoc(MI);
printInstruction(MI);

View File

@ -545,7 +545,7 @@ void PPCAsmPrinter::printPredicateOperand(const MachineInstr *MI, unsigned OpNo,
void PPCAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
++EmittedInsts;
processDebugLoc(MI->getDebugLoc());
processDebugLoc(MI);
// Check for slwi/srwi mnemonics.
if (MI->getOpcode() == PPC::RLWINM) {

View File

@ -124,7 +124,7 @@ bool SparcAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
II != E; ++II) {
// Print the assembly for the instruction.
processDebugLoc(II->getDebugLoc());
processDebugLoc(II);
printInstruction(II);
if (VerboseAsm && !II->getDebugLoc().isUnknown())

View File

@ -156,7 +156,7 @@ bool SystemZAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
void SystemZAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
++EmittedInsts;
processDebugLoc(MI->getDebugLoc());
processDebugLoc(MI);
// Call the autogenerated instruction printer routines.
printInstruction(MI);

View File

@ -653,7 +653,7 @@ bool X86AsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI,
void X86AsmPrinter::printMachineInstruction(const MachineInstr *MI) {
++EmittedInsts;
processDebugLoc(MI->getDebugLoc());
processDebugLoc(MI);
printInstructionThroughMCStreamer(MI);

View File

@ -352,7 +352,7 @@ bool XCoreAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
void XCoreAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
++EmittedInsts;
processDebugLoc(MI->getDebugLoc());
processDebugLoc(MI);
// Check for mov mnemonic
unsigned src, dst, srcSR, dstSR;