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 
19 
20 bool
21 lldb_private::operator== (const StackID& lhs, const StackID& rhs)
22 {
23     return lhs.GetCallFrameAddress()    == rhs.GetCallFrameAddress()    &&
24            lhs.GetInlineBlockID()       == rhs.GetInlineBlockID()       &&
25            lhs.GetStartAddress()        == rhs.GetStartAddress();
26 }
27 
28 bool
29 lldb_private::operator!= (const StackID& lhs, const StackID& rhs)
30 {
31     return lhs.GetCallFrameAddress()    != rhs.GetCallFrameAddress()    ||
32            lhs.GetInlineBlockID()       != rhs.GetInlineBlockID()       ||
33            lhs.GetStartAddress()        != rhs.GetStartAddress();
34 }
35 
36 bool
37 lldb_private::operator< (const StackID& lhs, const StackID& rhs)
38 {
39     if (lhs.GetCallFrameAddress() < rhs.GetCallFrameAddress())
40         return true;
41     return lhs.GetInlineBlockID() < rhs.GetInlineBlockID();
42 }
43