mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-03-07 11:59:09 +00:00
Wasn't handling case of when machine move labels were undefined.
llvm-svn: 31548
This commit is contained in:
parent
0aa28c8146
commit
8ffcf505f2
@ -1046,13 +1046,18 @@ public:
|
||||
/// 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user