From 07371882208f913d18a7f2a47373eaee7138416b Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 28 Oct 2006 18:10:06 +0000 Subject: [PATCH] don't print dead jump tables git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31266 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp index 9a740692b9b..bfd0e37924b 100644 --- a/lib/CodeGen/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter.cpp @@ -221,6 +221,9 @@ void AsmPrinter::EmitJumpTableInfo(MachineJumpTableInfo *MJTI, for (unsigned i = 0, e = JT.size(); i != e; ++i) { const std::vector &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.