From e7251a0377334bdb57bd188828bf89c9e3980fad Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 28 Oct 2006 18:11:20 +0000 Subject: [PATCH] add an assert git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31267 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/MachineFunction.cpp | 1 + 1 file changed, 1 insertion(+) 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; -- 2.34.1