[llvm-commits] CVS: llvm/lib/CodeGen/MachineFunction.cpp

Chris Lattner sabre at nondot.org
Sat Oct 28 11:11:34 PDT 2006



Changes in directory llvm/lib/CodeGen:

MachineFunction.cpp updated: 1.102 -> 1.103
---
Log message:

add an assert


---
Diffs of the changes:  (+1 -0)

 MachineFunction.cpp |    1 +
 1 files changed, 1 insertion(+)


Index: llvm/lib/CodeGen/MachineFunction.cpp
diff -u llvm/lib/CodeGen/MachineFunction.cpp:1.102 llvm/lib/CodeGen/MachineFunction.cpp:1.103
--- llvm/lib/CodeGen/MachineFunction.cpp:1.102	Tue Oct  3 15:19:23 2006
+++ llvm/lib/CodeGen/MachineFunction.cpp	Sat Oct 28 13:11:20 2006
@@ -363,6 +363,7 @@
 ///
 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;






More information about the llvm-commits mailing list