summaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen/MachineModuleInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen/MachineModuleInfo.h')
-rw-r--r--include/llvm/CodeGen/MachineModuleInfo.h25
1 files changed, 9 insertions, 16 deletions
diff --git a/include/llvm/CodeGen/MachineModuleInfo.h b/include/llvm/CodeGen/MachineModuleInfo.h
index 8eeac9f..fff8e83 100644
--- a/include/llvm/CodeGen/MachineModuleInfo.h
+++ b/include/llvm/CodeGen/MachineModuleInfo.h
@@ -217,26 +217,19 @@ public:
/// MachineModuleInfo, for example because the code was deleted.
void InvalidateLabel(unsigned LabelID) {
// Remap to zero to indicate deletion.
- RemapLabel(LabelID, 0);
- }
-
- /// 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.");
- assert(NewLabelID <= LabelIDList.size() &&
- "New label ID out of range.");
- LabelIDList[OldLabelID - 1] = NewLabelID;
+ assert(0 < LabelID && LabelID <= LabelIDList.size() &&
+ "Old label ID out of range.");
+ LabelIDList[LabelID - 1] = 0;
}
- /// 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 {
+ /// isLabelDeleted - Return true if the label was deleted.
+ /// FIXME: This should eventually be eliminated and use the 'is emitted' bit
+ /// on MCSymbol.
+ bool isLabelDeleted(unsigned LabelID) const {
assert(LabelID <= LabelIDList.size() && "Debug label ID out of range.");
- return LabelID ? LabelIDList[LabelID - 1] : 0;
+ return LabelID == 0 || LabelIDList[LabelID - 1] == 0;
}
-
+
/// getFrameMoves - Returns a reference to a list of moves done in the current
/// function's prologue. Used to construct frame maps for debug and exception
/// handling comsumers.
OpenPOWER on IntegriCloud