summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineModuleInfo.h
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2010-03-10 17:45:15 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2010-03-10 17:45:15 +0000
commitea5b2dd11c0526581803e7eb58224a2eabf191e6 (patch)
tree231646bba785a129b3a2d409badb74e7ccd1594c /include/llvm/CodeGen/MachineModuleInfo.h
parentf5a3459adfde823bc7617f8ecfdd9fbc5a1ffadf (diff)
Notes
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 8eeac9f1e517..fff8e83354c0 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.