Changes in directory llvm/include/llvm/CodeGen:
MachineDebugInfo.h updated: 1.45 -> 1.46 --- Log message: Wasn't handling case of when machine move labels were undefined. --- Diffs of the changes: (+6 -1) MachineDebugInfo.h | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletion(-) Index: llvm/include/llvm/CodeGen/MachineDebugInfo.h diff -u llvm/include/llvm/CodeGen/MachineDebugInfo.h:1.45 llvm/include/llvm/CodeGen/MachineDebugInfo.h:1.46 --- llvm/include/llvm/CodeGen/MachineDebugInfo.h:1.45 Tue Nov 7 13:33:46 2006 +++ llvm/include/llvm/CodeGen/MachineDebugInfo.h Wed Nov 8 08:16:39 2006 @@ -1046,13 +1046,18 @@ /// RemapLabel - Indicate that a label has been merged into another. /// void RemapLabel(unsigned OldLabelID, unsigned NewLabelID) { + assert(0 < OldLabelID && OldLabelID <= LabelIDList.size() && + "Old debug label ID out of range."); + assert(NewLabelID <= LabelIDList.size() && + "New debug label ID out of range."); LabelIDList[OldLabelID - 1] = NewLabelID; } /// MappedLabel - Find out the label's final ID. Zero indicates deletion. /// ID != Mapped ID indicates that the label was folded into another label. unsigned MappedLabel(unsigned LabelID) const { - return LabelIDList[LabelID - 1]; + assert(LabelID <= LabelIDList.size() && "Debug label ID out of range."); + return LabelID ? LabelIDList[LabelID - 1] : 0; } /// RecordSource - Register a source file with debug info. Returns an source _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits