From: Chris Lattner Date: Sat, 28 Oct 2006 18:11:20 +0000 (+0000) Subject: add an assert X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e7251a0377334bdb57bd188828bf89c9e3980fad;p=oota-llvm.git add an assert git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31267 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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;