LLDB  mainline
CompilerDecl.cpp
Go to the documentation of this file.
1 //===-- CompilerDecl.cpp ----------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
11 #include "lldb/Symbol/TypeSystem.h"
12 
13 using namespace lldb_private;
14 
15 bool CompilerDecl::IsClang() const {
16  return IsValid() && m_type_system->getKind() == TypeSystem::eKindClang;
17 }
18 
20  return m_type_system->DeclGetName(m_opaque_decl);
21 }
22 
24  return m_type_system->DeclGetMangledName(m_opaque_decl);
25 }
26 
28  return m_type_system->DeclGetDeclContext(m_opaque_decl);
29 }
30 
32  return m_type_system->DeclGetFunctionReturnType(m_opaque_decl);
33 }
34 
36  return m_type_system->DeclGetFunctionNumArguments(m_opaque_decl);
37 }
38 
40  return m_type_system->DeclGetFunctionArgumentType(m_opaque_decl, arg_idx);
41 }
42 
44  const lldb_private::CompilerDecl &rhs) {
45  return lhs.GetTypeSystem() == rhs.GetTypeSystem() &&
46  lhs.GetOpaqueDecl() == rhs.GetOpaqueDecl();
47 }
48 
50  const lldb_private::CompilerDecl &rhs) {
51  return lhs.GetTypeSystem() != rhs.GetTypeSystem() ||
52  lhs.GetOpaqueDecl() != rhs.GetOpaqueDecl();
53 }
CompilerType GetFunctionReturnType() const
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
ConstString GetMangledName() const
LLVMCastKind getKind() const
Definition: TypeSystem.h:76
virtual CompilerType DeclGetFunctionReturnType(void *opaque_decl)
Definition: TypeSystem.cpp:139
bool operator==(const Address &lhs, const Address &rhs)
Definition: Address.cpp:973
virtual ConstString DeclGetName(void *opaque_decl)=0
CompilerType GetFunctionArgumentType(size_t arg_idx) const
CompilerDeclContext GetDeclContext() const
virtual CompilerType DeclGetFunctionArgumentType(void *opaque_decl, size_t arg_idx)
Definition: TypeSystem.cpp:145
TypeSystem * GetTypeSystem() const
Definition: CompilerDecl.h:46
virtual CompilerDeclContext DeclGetDeclContext(void *opaque_decl)
Definition: TypeSystem.cpp:135
bool operator!=(const Address &lhs, const Address &rhs)
Definition: Address.cpp:979
A uniqued constant string class.
Definition: ConstString.h:38
ConstString GetName() const
virtual ConstString DeclGetMangledName(void *opaque_decl)
Definition: TypeSystem.cpp:131
size_t GetNumFunctionArguments() const
virtual size_t DeclGetFunctionNumArguments(void *opaque_decl)
Definition: TypeSystem.cpp:143
void * GetOpaqueDecl() const
Definition: CompilerDecl.h:48