summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-25 19:39:52 +0000
committerChris Lattner <sabre@nondot.org>2010-01-25 19:39:52 +0000
commit6330d5330e35c65efe3b414710818bdc043edc1c (patch)
treeb3c7f201e007271a2329185dadb59ab5acc67bda
parenta9ee93ef42f2fb8d338b686767556d45fbb81a02 (diff)
downloadbcm5719-llvm-6330d5330e35c65efe3b414710818bdc043edc1c.tar.gz
bcm5719-llvm-6330d5330e35c65efe3b414710818bdc043edc1c.zip
sink an arm specific method out of asmprinter into the ARMAsmPrinter and
rename it to avoid shadowing. llvm-svn: 94440
-rw-r--r--llvm/include/llvm/CodeGen/AsmPrinter.h2
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp13
-rw-r--r--llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp18
-rw-r--r--llvm/lib/Target/X86/AsmPrinter/X86AsmPrinter.h4
4 files changed, 17 insertions, 20 deletions
diff --git a/llvm/include/llvm/CodeGen/AsmPrinter.h b/llvm/include/llvm/CodeGen/AsmPrinter.h
index 8959c755c1e..48cf86b53c4 100644
--- a/llvm/include/llvm/CodeGen/AsmPrinter.h
+++ b/llvm/include/llvm/CodeGen/AsmPrinter.h
@@ -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;
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index fe2ef7adebb..292fcdb10c5 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -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;
diff --git a/llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp b/llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
index e1f386ee3dd..f3f86402a55 100644
--- a/llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
+++ b/llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
@@ -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)
diff --git a/llvm/lib/Target/X86/AsmPrinter/X86AsmPrinter.h b/llvm/lib/Target/X86/AsmPrinter/X86AsmPrinter.h
index 6a9262d90fe..fc94033ec2a 100644
--- a/llvm/lib/Target/X86/AsmPrinter/X86AsmPrinter.h
+++ b/llvm/lib/Target/X86/AsmPrinter/X86AsmPrinter.h
@@ -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;
OpenPOWER on IntegriCloud