mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-25 17:20:48 +00:00
inline RemapLabel into its only caller and simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98029 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -217,17 +217,9 @@ public:
|
|||||||
/// MachineModuleInfo, for example because the code was deleted.
|
/// MachineModuleInfo, for example because the code was deleted.
|
||||||
void InvalidateLabel(unsigned LabelID) {
|
void InvalidateLabel(unsigned LabelID) {
|
||||||
// Remap to zero to indicate deletion.
|
// Remap to zero to indicate deletion.
|
||||||
RemapLabel(LabelID, 0);
|
assert(0 < LabelID && LabelID <= LabelIDList.size() &&
|
||||||
}
|
|
||||||
|
|
||||||
/// RemapLabel - Indicate that a label has been merged into another.
|
|
||||||
///
|
|
||||||
void RemapLabel(unsigned OldLabelID, unsigned NewLabelID) {
|
|
||||||
assert(0 < OldLabelID && OldLabelID <= LabelIDList.size() &&
|
|
||||||
"Old label ID out of range.");
|
"Old label ID out of range.");
|
||||||
assert(NewLabelID <= LabelIDList.size() &&
|
LabelIDList[LabelID - 1] = 0;
|
||||||
"New label ID out of range.");
|
|
||||||
LabelIDList[OldLabelID - 1] = NewLabelID;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// MappedLabel - Find out the label's final ID. Zero indicates deletion.
|
/// MappedLabel - Find out the label's final ID. Zero indicates deletion.
|
||||||
|
Reference in New Issue
Block a user