summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2009-02-06 21:34:12 +0000
committerBill Wendling <isanbard@gmail.com>2009-02-06 21:34:12 +0000
commit3ebc1ca43e377ecb0307da9af95bfafdc66603ef (patch)
tree55f0043cfd93e075c85771c92b5409d3a982148b
parent21cb4114fbfa1495e95e71b252b123fe16e72318 (diff)
downloadbcm5719-llvm-3ebc1ca43e377ecb0307da9af95bfafdc66603ef.tar.gz
bcm5719-llvm-3ebc1ca43e377ecb0307da9af95bfafdc66603ef.zip
Add comparison operators to DebugLoc.
llvm-svn: 63966
-rw-r--r--llvm/include/llvm/CodeGen/DebugLoc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/include/llvm/CodeGen/DebugLoc.h b/llvm/include/llvm/CodeGen/DebugLoc.h
index 51f5116c756..d77ee847b6c 100644
--- a/llvm/include/llvm/CodeGen/DebugLoc.h
+++ b/llvm/include/llvm/CodeGen/DebugLoc.h
@@ -48,6 +48,9 @@ namespace llvm {
/// isUnknown - Return true if there is no debug info for the SDNode /
/// MachineInstr.
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.
OpenPOWER on IntegriCloud