sink an arm specific method out of asmprinter into the ARMAsmPrinter and
authorChris Lattner <sabre@nondot.org>
Mon, 25 Jan 2010 19:39:52 +0000 (19:39 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 25 Jan 2010 19:39:52 +0000 (19:39 +0000)
rename it to avoid shadowing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94440 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/AsmPrinter.h
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
lib/Target/X86/AsmPrinter/X86AsmPrinter.h

index 8959c755c1e7a5be0fbbef20a2765c62c8a5c920..48cf86b53c4c355872b5645c4087f9ca8a42ae4c 100644 (file)
@@ -365,8 +365,6 @@ namespace llvm {
     /// 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;
index fe2ef7adebb45fa5bd40a03f3be9b3d8376104a6..292fcdb10c54b56008a2dbf6d109efb1d6815f7f 100644 (file)
@@ -1529,19 +1529,6 @@ void AsmPrinter::printPICJumpTableSetLabel(unsigned uid,
     << '-' << *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;
   
index e1f386ee3dd39e74b17232e53cbcaa538ac5af06..f3f86402a554d97ef2490f86647ec0cc95bf129c 100644 (file)
@@ -167,6 +167,9 @@ namespace {
     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::printCPInstOperand(const MachineInstr *MI, int OpNum,
   }
 }
 
+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 @@ void ARMAsmPrinter::printJTBlockOperand(const MachineInstr *MI, int OpNum) {
     bool isNew = JTSets.insert(MBB);
 
     if (UseSet && isNew)
-      printPICJumpTableSetLabel(JTI, MO2.getImm(), MBB);
+      printPICJumpTableSetLabel2(JTI, MO2.getImm(), MBB);
 
     O << JTEntryDirective << ' ';
     if (UseSet)
index 6a9262d90fe0abbbfab0b065d2a1c626bdfc5fb6..fc94033ec2a85ca25a1f9110e76f7acdd3befce7 100644 (file)
@@ -126,10 +126,6 @@ class VISIBILITY_HIDDEN X86AsmPrinter : public AsmPrinter {
                             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;