blob: f530b2072a80b6616ec4d5029d7d7ad29464c3aa [file] [log] [blame]
Paul Hermand628cbb2015-09-15 23:44:17 +00001//===-- CompilerDecl.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/Symbol/CompilerDecl.h"
11#include "lldb/Symbol/CompilerDeclContext.h"
12#include "lldb/Symbol/TypeSystem.h"
13
14using namespace lldb_private;
15
16bool
17CompilerDecl::IsClang () const
18{
19 return IsValid() && m_type_system->getKind() == TypeSystem::eKindClang;
20}
21
22ConstString
23CompilerDecl::GetName() const
24{
25 return m_type_system->DeclGetName(m_opaque_decl);
26}
27
28lldb::VariableSP
29CompilerDecl::GetAsVariable ()
30{
31 return m_type_system->DeclGetVariable(m_opaque_decl);
32}
33
34bool
35lldb_private::operator == (const lldb_private::CompilerDecl &lhs, const lldb_private::CompilerDecl &rhs)
36{
37 return lhs.GetTypeSystem() == rhs.GetTypeSystem() && lhs.GetOpaqueDecl() == rhs.GetOpaqueDecl();
38}
39
40
41bool
42lldb_private::operator != (const lldb_private::CompilerDecl &lhs, const lldb_private::CompilerDecl &rhs)
43{
44 return lhs.GetTypeSystem() != rhs.GetTypeSystem() || lhs.GetOpaqueDecl() != rhs.GetOpaqueDecl();
45}
46