blob: 6d34d3b1770ac2c392641f5711e7f5c1a6174416 [file] [log] [blame]
Chris Lattner24943d22010-06-08 16:52:24 +00001//===-- 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
17using namespace lldb_private;
18
Chris Lattner24943d22010-06-08 16:52:24 +000019
Chris Lattner24943d22010-06-08 16:52:24 +000020bool
21lldb_private::operator== (const StackID& lhs, const StackID& rhs)
22{
Greg Claytonf40e3082010-08-26 02:28:22 +000023 return lhs.GetCallFrameAddress() == rhs.GetCallFrameAddress() &&
24 lhs.GetInlineBlockID() == rhs.GetInlineBlockID() &&
25 lhs.GetStartAddress() == rhs.GetStartAddress();
Chris Lattner24943d22010-06-08 16:52:24 +000026}
27
28bool
29lldb_private::operator!= (const StackID& lhs, const StackID& rhs)
30{
Greg Claytonf40e3082010-08-26 02:28:22 +000031 return lhs.GetCallFrameAddress() != rhs.GetCallFrameAddress() ||
32 lhs.GetInlineBlockID() != rhs.GetInlineBlockID() ||
33 lhs.GetStartAddress() != rhs.GetStartAddress();
Chris Lattner24943d22010-06-08 16:52:24 +000034}
35
36bool
37lldb_private::operator< (const StackID& lhs, const StackID& rhs)
38{
Greg Claytonf40e3082010-08-26 02:28:22 +000039 if (lhs.GetCallFrameAddress() < rhs.GetCallFrameAddress())
40 return true;
41 return lhs.GetInlineBlockID() < rhs.GetInlineBlockID();
Chris Lattner24943d22010-06-08 16:52:24 +000042}