diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp index 205414e7264..7617de962d7 100644 --- a/lib/CodeGen/MachineFunction.cpp +++ b/lib/CodeGen/MachineFunction.cpp @@ -363,6 +363,7 @@ void MachineFrameInfo::dump(const MachineFunction &MF) const { /// unsigned MachineJumpTableInfo::getJumpTableIndex( std::vector &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;