Add a printSetLabel that takes two id's.
authorEvan Cheng <evan.cheng@apple.com>
Wed, 1 Nov 2006 09:23:08 +0000 (09:23 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Wed, 1 Nov 2006 09:23:08 +0000 (09:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31347 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/AsmPrinter.h
lib/CodeGen/AsmPrinter.cpp

index 7be2482b6252e708e6daa687e7ffd17e7e3018b0..59d5b153ea79f89e0f15fd788aba56eec56588b0 100644 (file)
@@ -206,6 +206,8 @@ namespace llvm {
     /// printSetLabel - This method prints a set label for the specified
     /// MachineBasicBlock
     void printSetLabel(unsigned uid, const MachineBasicBlock *MBB) const;
+    void printSetLabel(unsigned uid, unsigned uid2,
+                       const MachineBasicBlock *MBB) const;
 
     /// printDataDirective - This method prints the asm directive for the
     /// specified type.
index 05761d164769b7ac8ea9f2feddb64fd07382f4fa..9454fe5beb16e501ce645ec4fa84d40a458cff35 100644 (file)
@@ -875,6 +875,19 @@ void AsmPrinter::printSetLabel(unsigned uid,
     << '_' << uid << '\n';
 }
 
+void AsmPrinter::printSetLabel(unsigned uid, unsigned uid2,
+                               const MachineBasicBlock *MBB) const {
+  if (!TAI->getSetDirective())
+    return;
+  
+  O << TAI->getSetDirective() << ' ' << TAI->getPrivateGlobalPrefix()
+    << getFunctionNumber() << '_' << uid << '_' << uid2
+    << "_set_" << MBB->getNumber() << ',';
+  printBasicBlockLabel(MBB, false, false);
+  O << '-' << TAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber() 
+    << '_' << uid << '_' << uid2 << '\n';
+}
+
 /// printDataDirective - This method prints the asm directive for the
 /// specified type.
 void AsmPrinter::printDataDirective(const Type *type) {