diff options
| author | Bill Wendling <isanbard@gmail.com> | 2009-02-19 09:16:38 +0000 |
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2009-02-19 09:16:38 +0000 |
| commit | 4dd82f6aaa483ef11bd74795c81cfc30b52821af (patch) | |
| tree | 8ebc08e44924287722d5aabaa3d9cc81ec2346cb /include/llvm/CodeGen/DebugLoc.h | |
| parent | 249e1e4e2742977a4e3a5ba336b83168a4af43c0 (diff) | |
| download | external_llvm-4dd82f6aaa483ef11bd74795c81cfc30b52821af.zip external_llvm-4dd82f6aaa483ef11bd74795c81cfc30b52821af.tar.gz external_llvm-4dd82f6aaa483ef11bd74795c81cfc30b52821af.tar.bz2 | |
Print out a new label only if the debug location *tuple* is different. The debug
locations may change, but the tuples may be the same.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65039 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/DebugLoc.h')
| -rw-r--r-- | include/llvm/CodeGen/DebugLoc.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/DebugLoc.h b/include/llvm/CodeGen/DebugLoc.h index 5052928..d5ad9dc 100644 --- a/include/llvm/CodeGen/DebugLoc.h +++ b/include/llvm/CodeGen/DebugLoc.h @@ -27,6 +27,13 @@ namespace llvm { DebugLocTuple(unsigned s, unsigned l, unsigned c) : Src(s), Line(l), Col(c) {}; + + bool operator==(const DebugLocTuple &DLT) const { + return Src == DLT.Src && Line == DLT.Line && Col == DLT.Col; + } + bool operator!=(const DebugLocTuple &DLT) const { + return !(*this == DLT); + } }; /// DebugLoc - Debug location id. This is carried by SDNode and MachineInstr |
