From 44e87255e9b7a9d8ecb558690db1181882c08045 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 25 Jan 2010 22:41:33 +0000 Subject: [PATCH] eliminate redundant argument to EmitJumpTableInfo git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94464 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/AsmPrinter.h | 2 +- lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 5 +++-- lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp | 2 +- lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp | 2 +- lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp | 2 +- lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp | 2 +- lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp | 4 ++-- lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp | 2 +- lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp | 2 +- lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp | 2 +- 10 files changed, 13 insertions(+), 12 deletions(-) diff --git a/include/llvm/CodeGen/AsmPrinter.h b/include/llvm/CodeGen/AsmPrinter.h index fabb07731e7..7432a83dc09 100644 --- a/include/llvm/CodeGen/AsmPrinter.h +++ b/include/llvm/CodeGen/AsmPrinter.h @@ -234,7 +234,7 @@ namespace llvm { /// EmitJumpTableInfo - Print assembly representations of the jump tables /// used by the current function to the current output stream. /// - void EmitJumpTableInfo(MachineJumpTableInfo *MJTI, MachineFunction &MF); + void EmitJumpTableInfo(MachineFunction &MF); /// EmitGlobalVariable - Emit the specified global variable to the .s file. virtual void EmitGlobalVariable(const GlobalVariable *GV); diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index c0c93506ddb..024a252d956 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -469,8 +469,9 @@ void AsmPrinter::EmitConstantPool(MachineConstantPool *MCP) { /// EmitJumpTableInfo - Print assembly representations of the jump tables used /// by the current function to the current output stream. /// -void AsmPrinter::EmitJumpTableInfo(MachineJumpTableInfo *MJTI, - MachineFunction &MF) { +void AsmPrinter::EmitJumpTableInfo(MachineFunction &MF) { + MachineJumpTableInfo *MJTI = MF.getJumpTableInfo(); + if (MJTI == 0) return; const std::vector &JT = MJTI->getJumpTables(); if (JT.empty()) return; diff --git a/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp b/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp index b13f544843e..1606c54e1c4 100644 --- a/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp +++ b/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp @@ -133,7 +133,7 @@ bool AlphaAsmPrinter::runOnMachineFunction(MachineFunction &MF) { EmitConstantPool(MF.getConstantPool()); // Print out jump tables referenced by the function - EmitJumpTableInfo(MF.getJumpTableInfo(), MF); + EmitJumpTableInfo(MF); // Print out labels for the function. const Function *F = MF.getFunction(); diff --git a/lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp b/lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp index 749f735f0d0..de623bc64a8 100644 --- a/lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp +++ b/lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp @@ -96,7 +96,7 @@ void BlackfinAsmPrinter::emitLinkage(const MCSymbol *GVSym, bool BlackfinAsmPrinter::runOnMachineFunction(MachineFunction &MF) { SetupMachineFunction(MF); EmitConstantPool(MF.getConstantPool()); - EmitJumpTableInfo(MF.getJumpTableInfo(), MF); + EmitJumpTableInfo(MF); const Function *F = MF.getFunction(); OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(F, Mang, TM)); diff --git a/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp b/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp index 59d6dddf6ea..caf674c3a9d 100644 --- a/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp +++ b/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp @@ -458,7 +458,7 @@ bool LinuxAsmPrinter::runOnMachineFunction(MachineFunction &MF) { O << "\t.size\t" << *CurrentFnSym << ",.-" << *CurrentFnSym << "\n"; // Print out jump tables referenced by the function. - EmitJumpTableInfo(MF.getJumpTableInfo(), MF); + EmitJumpTableInfo(MF); // Emit post-function debug information. DW->EndFunction(&MF); diff --git a/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp b/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp index 9af9bd8b4e7..fd0ab2d99b5 100644 --- a/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp +++ b/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp @@ -256,7 +256,7 @@ bool MipsAsmPrinter::runOnMachineFunction(MachineFunction &MF) { EmitConstantPool(MF.getConstantPool()); // Print out jump tables referenced by the function - EmitJumpTableInfo(MF.getJumpTableInfo(), MF); + EmitJumpTableInfo(MF); O << "\n\n"; diff --git a/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp b/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp index b89c2b48721..6b0931480e3 100644 --- a/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp +++ b/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp @@ -671,7 +671,7 @@ bool PPCLinuxAsmPrinter::runOnMachineFunction(MachineFunction &MF) { DW->EndFunction(&MF); // Print out jump tables referenced by the function. - EmitJumpTableInfo(MF.getJumpTableInfo(), MF); + EmitJumpTableInfo(MF); // We didn't modify anything. return false; @@ -765,7 +765,7 @@ bool PPCDarwinAsmPrinter::runOnMachineFunction(MachineFunction &MF) { DW->EndFunction(&MF); // Print out jump tables referenced by the function. - EmitJumpTableInfo(MF.getJumpTableInfo(), MF); + EmitJumpTableInfo(MF); // We didn't modify anything. return false; diff --git a/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp b/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp index 5c3fe37d6a4..59260f63e81 100644 --- a/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp +++ b/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp @@ -138,7 +138,7 @@ bool SystemZAsmPrinter::runOnMachineFunction(MachineFunction &MF) { O << "\t.size\t" << *CurrentFnSym << ", .-" << *CurrentFnSym << '\n'; // Print out jump tables referenced by the function. - EmitJumpTableInfo(MF.getJumpTableInfo(), MF); + EmitJumpTableInfo(MF); // We didn't modify anything return false; diff --git a/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp b/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp index adae407385e..b79d19a8509 100644 --- a/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp +++ b/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp @@ -194,7 +194,7 @@ bool X86AsmPrinter::runOnMachineFunction(MachineFunction &MF) { DW->EndFunction(&MF); // Print out jump tables referenced by the function. - EmitJumpTableInfo(MF.getJumpTableInfo(), MF); + EmitJumpTableInfo(MF); // We didn't modify anything. return false; diff --git a/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp b/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp index 40d71606c38..76dd337dce8 100644 --- a/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp +++ b/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp @@ -241,7 +241,7 @@ bool XCoreAsmPrinter::runOnMachineFunction(MachineFunction &MF) EmitConstantPool(MF.getConstantPool()); // Print out jump tables referenced by the function - EmitJumpTableInfo(MF.getJumpTableInfo(), MF); + EmitJumpTableInfo(MF); // Emit the function start directives emitFunctionStart(MF);