[llvm-commits] [llvm] r94440 - in /llvm/trunk: include/llvm/CodeGen/AsmPrinter.h lib/CodeGen/AsmPrinter/AsmPrinter.cpp lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp lib/Target/X86/AsmPrinter/X86AsmPrinter.h
Chris Lattner
sabre at nondot.org
Mon Jan 25 11:39:53 PST 2010
Author: lattner
Date: Mon Jan 25 13:39:52 2010
New Revision: 94440
URL: http://llvm.org/viewvc/llvm-project?rev=94440&view=rev
Log:
sink an arm specific method out of asmprinter into the ARMAsmPrinter and
rename it to avoid shadowing.
Modified:
llvm/trunk/include/llvm/CodeGen/AsmPrinter.h
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.h
Modified: llvm/trunk/include/llvm/CodeGen/AsmPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/AsmPrinter.h?rev=94440&r1=94439&r2=94440&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/AsmPrinter.h (original)
+++ llvm/trunk/include/llvm/CodeGen/AsmPrinter.h Mon Jan 25 13:39:52 2010
@@ -365,8 +365,6 @@
/// specified MachineBasicBlock for a jumptable entry.
virtual void printPICJumpTableSetLabel(unsigned uid,
const MachineBasicBlock *MBB) const;
- virtual void printPICJumpTableSetLabel(unsigned uid, unsigned uid2,
- const MachineBasicBlock *MBB) const;
virtual void printPICJumpTableEntry(const MachineJumpTableInfo *MJTI,
const MachineBasicBlock *MBB,
unsigned uid) const;
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=94440&r1=94439&r2=94440&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Mon Jan 25 13:39:52 2010
@@ -1529,19 +1529,6 @@
<< '-' << *GetJTISymbol(uid) << '\n';
}
-void AsmPrinter::printPICJumpTableSetLabel(unsigned uid, unsigned uid2,
- const MachineBasicBlock *MBB) const {
- if (!MAI->getSetDirective())
- return;
-
- O << MAI->getSetDirective() << ' ' << MAI->getPrivateGlobalPrefix()
- << getFunctionNumber() << '_' << uid << '_' << uid2
- << "_set_" << MBB->getNumber() << ','
- << *GetMBBSymbol(MBB->getNumber())
- << '-' << MAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber()
- << '_' << uid << '_' << uid2 << '\n';
-}
-
void AsmPrinter::printVisibility(MCSymbol *Sym, unsigned Visibility) const {
MCSymbolAttr Attr = MCSA_Invalid;
Modified: llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp?rev=94440&r1=94439&r2=94440&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp Mon Jan 25 13:39:52 2010
@@ -167,6 +167,9 @@
void EmitStartOfAsmFile(Module &M);
void EmitEndOfAsmFile(Module &M);
+ virtual void printPICJumpTableSetLabel2(unsigned uid, unsigned uid2,
+ const MachineBasicBlock *MBB) const;
+
/// EmitMachineConstantPoolValue - Print a machine constantpool value to
/// the .s file.
virtual void EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV) {
@@ -904,6 +907,19 @@
}
}
+void ARMAsmPrinter::printPICJumpTableSetLabel2(unsigned uid, unsigned uid2,
+ const MachineBasicBlock *MBB) const {
+ if (!MAI->getSetDirective())
+ return;
+
+ O << MAI->getSetDirective() << ' ' << MAI->getPrivateGlobalPrefix()
+ << getFunctionNumber() << '_' << uid << '_' << uid2
+ << "_set_" << MBB->getNumber() << ','
+ << *GetMBBSymbol(MBB->getNumber())
+ << '-' << MAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber()
+ << '_' << uid << '_' << uid2 << '\n';
+}
+
void ARMAsmPrinter::printJTBlockOperand(const MachineInstr *MI, int OpNum) {
assert(!Subtarget->isThumb2() && "Thumb2 should use double-jump jumptables!");
@@ -927,7 +943,7 @@
bool isNew = JTSets.insert(MBB);
if (UseSet && isNew)
- printPICJumpTableSetLabel(JTI, MO2.getImm(), MBB);
+ printPICJumpTableSetLabel2(JTI, MO2.getImm(), MBB);
O << JTEntryDirective << ' ';
if (UseSet)
Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.h?rev=94440&r1=94439&r2=94440&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.h (original)
+++ llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.h Mon Jan 25 13:39:52 2010
@@ -126,10 +126,6 @@
const char *Modifier=NULL);
void printPICJumpTableSetLabel(unsigned uid,
const MachineBasicBlock *MBB) const;
- void printPICJumpTableSetLabel(unsigned uid, unsigned uid2,
- const MachineBasicBlock *MBB) const {
- AsmPrinter::printPICJumpTableSetLabel(uid, uid2, MBB);
- }
void printPICJumpTableEntry(const MachineJumpTableInfo *MJTI,
const MachineBasicBlock *MBB,
unsigned uid) const;
More information about the llvm-commits
mailing list