aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
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;