Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 1 | //===-- StackID.cpp ---------------------------------------------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #include "lldb/Target/StackID.h" |
| 11 | |
| 12 | // C Includes |
| 13 | // C++ Includes |
| 14 | // Other libraries and framework includes |
| 15 | // Project includes |
| 16 | |
| 17 | using namespace lldb_private; |
| 18 | |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 19 | |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 20 | bool |
| 21 | lldb_private::operator== (const StackID& lhs, const StackID& rhs) |
| 22 | { |
Greg Clayton | f40e308 | 2010-08-26 02:28:22 +0000 | [diff] [blame^] | 23 | return lhs.GetCallFrameAddress() == rhs.GetCallFrameAddress() && |
| 24 | lhs.GetInlineBlockID() == rhs.GetInlineBlockID() && |
| 25 | lhs.GetStartAddress() == rhs.GetStartAddress(); |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 26 | } |
| 27 | |
| 28 | bool |
| 29 | lldb_private::operator!= (const StackID& lhs, const StackID& rhs) |
| 30 | { |
Greg Clayton | f40e308 | 2010-08-26 02:28:22 +0000 | [diff] [blame^] | 31 | return lhs.GetCallFrameAddress() != rhs.GetCallFrameAddress() || |
| 32 | lhs.GetInlineBlockID() != rhs.GetInlineBlockID() || |
| 33 | lhs.GetStartAddress() != rhs.GetStartAddress(); |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 34 | } |
| 35 | |
| 36 | bool |
| 37 | lldb_private::operator< (const StackID& lhs, const StackID& rhs) |
| 38 | { |
Greg Clayton | f40e308 | 2010-08-26 02:28:22 +0000 | [diff] [blame^] | 39 | if (lhs.GetCallFrameAddress() < rhs.GetCallFrameAddress()) |
| 40 | return true; |
| 41 | return lhs.GetInlineBlockID() < rhs.GetInlineBlockID(); |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 42 | } |