From 28328f9a0ad083bc243afbb38ebe39ddec0105d8 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 28 Oct 2006 18:11:20 +0000 Subject: add an assert llvm-svn: 31267 --- llvm/lib/CodeGen/MachineFunction.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib/CodeGen/MachineFunction.cpp') diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index 205414e7264..7617de962d7 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/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; -- cgit v1.2.3