1 //===-- CompilerDeclContext.cpp ---------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "lldb/Symbol/CompilerDeclContext.h"
11 #include "lldb/Symbol/CompilerDecl.h"
12 #include "lldb/Symbol/TypeSystem.h"
15 using namespace lldb_private;
17 std::vector<CompilerDecl>
18 CompilerDeclContext::FindDeclByName (ConstString name)
21 return m_type_system->DeclContextFindDeclByName(m_opaque_decl_ctx, name);
23 return std::vector<CompilerDecl>();
27 CompilerDeclContext::IsClang () const
29 return IsValid() && m_type_system->getKind() == TypeSystem::eKindClang;
33 CompilerDeclContext::GetName () const
36 return m_type_system->DeclContextGetName(m_opaque_decl_ctx);
42 CompilerDeclContext::IsStructUnionOrClass () const
45 return m_type_system->DeclContextIsStructUnionOrClass(m_opaque_decl_ctx);
51 CompilerDeclContext::IsClassMethod (lldb::LanguageType *language_ptr,
52 bool *is_instance_method_ptr,
53 ConstString *language_object_name_ptr)
56 return m_type_system->DeclContextIsClassMethod (m_opaque_decl_ctx,
58 is_instance_method_ptr,
59 language_object_name_ptr);
65 lldb_private::operator == (const lldb_private::CompilerDeclContext &lhs, const lldb_private::CompilerDeclContext &rhs)
67 return lhs.GetTypeSystem() == rhs.GetTypeSystem() && lhs.GetOpaqueDeclContext() == rhs.GetOpaqueDeclContext();
72 lldb_private::operator != (const lldb_private::CompilerDeclContext &lhs, const lldb_private::CompilerDeclContext &rhs)
74 return lhs.GetTypeSystem() != rhs.GetTypeSystem() || lhs.GetOpaqueDeclContext() != rhs.GetOpaqueDeclContext();