Add comparison operators to DebugLoc.

llvm-svn: 63966
This commit is contained in:
Bill Wendling 2009-02-06 21:34:12 +00:00
parent 21cb4114fb
commit 3ebc1ca43e
1 changed files with 3 additions and 0 deletions

View File

@ -48,6 +48,9 @@ namespace llvm {
/// isUnknown - Return true if there is no debug info for the SDNode / /// isUnknown - Return true if there is no debug info for the SDNode /
/// MachineInstr. /// MachineInstr.
bool isUnknown() const { return Idx == 0; } bool isUnknown() const { return Idx == 0; }
bool operator==(const DebugLoc &DL) { return Idx == DL.Idx; }
bool operator!=(const DebugLoc &DL) { return !(*this == DL); }
}; };
// Partially specialize DenseMapInfo for DebugLocTyple. // Partially specialize DenseMapInfo for DebugLocTyple.