add an assert

llvm-svn: 31267
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp
index 205414e..7617de9 100644
--- a/llvm/lib/CodeGen/MachineFunction.cpp
+++ b/llvm/lib/CodeGen/MachineFunction.cpp
@@ -363,6 +363,7 @@
 ///
 unsigned MachineJumpTableInfo::getJumpTableIndex(
                                      std::vector<MachineBasicBlock*> &DestBBs) {
+  assert(!DestBBs.empty() && "Cannot create an empty jump table!");
   for (unsigned i = 0, e = JumpTables.size(); i != e; ++i)
     if (JumpTables[i].MBBs == DestBBs)
       return i;