aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-10-28 18:10:06 +0000
committerChris Lattner <sabre@nondot.org>2006-10-28 18:10:06 +0000
commit07371882208f913d18a7f2a47373eaee7138416b (patch)
treeb11cdd43f7a7d997f287c201a6e6b76dd5b8ea9e /lib/CodeGen/AsmPrinter.cpp
parent5bd0c00b8074200184a067331f2be7e16a3a9f61 (diff)
don't print dead jump tables
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31266 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp
index 9a740692b9..bfd0e37924 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<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.