don't print dead jump tables
authorChris Lattner <sabre@nondot.org>
Sat, 28 Oct 2006 18:10:06 +0000 (18:10 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 28 Oct 2006 18:10:06 +0000 (18:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31266 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter.cpp

index 9a740692b9becd39f8443c1875692e949cc2c0ce..bfd0e37924b4ba3cd715301cd2e22065e0f6299d 100644 (file)
@@ -221,6 +221,9 @@ void AsmPrinter::EmitJumpTableInfo(MachineJumpTableInfo *MJTI,
   
   for (unsigned i = 0, e = JT.size(); i != e; ++i) {
     const std::vector<MachineBasicBlock*> &JTBBs = JT[i].MBBs;
+    
+    // If this jump table was deleted, ignore it. 
+    if (JTBBs.empty()) continue;
 
     // For PIC codegen, if possible we want to use the SetDirective to reduce
     // the number of relocations the assembler will generate for the jump table.