aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-10-28 18:11:20 +0000
committerChris Lattner <sabre@nondot.org>2006-10-28 18:11:20 +0000
commite7251a0377334bdb57bd188828bf89c9e3980fad (patch)
tree0936c3977c9c988fdf97ed360563fcd7c5c89df9 /lib/CodeGen/MachineFunction.cpp
parent07371882208f913d18a7f2a47373eaee7138416b (diff)
add an assert
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31267 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineFunction.cpp')
-rw-r--r--lib/CodeGen/MachineFunction.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp
index 205414e726..7617de962d 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<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;