aboutsummaryrefslogtreecommitdiff
path: root/llvm/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
commit28328f9a0ad083bc243afbb38ebe39ddec0105d8 (patch)
tree25dc44abb5e9bda21f5b1946a3ab1a429faf1c93 /llvm/lib/CodeGen/MachineFunction.cpp
parent28bfe389d1b0d6176380ff52e1d5a3cddef1fb74 (diff)
downloadllvm-28328f9a0ad083bc243afbb38ebe39ddec0105d8.zip
llvm-28328f9a0ad083bc243afbb38ebe39ddec0105d8.tar.gz
llvm-28328f9a0ad083bc243afbb38ebe39ddec0105d8.tar.bz2
add an assert
llvm-svn: 31267
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineFunction.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp
index 205414e..7617de9 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<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;