Path: blob/main/contrib/llvm-project/lldb/source/Symbol/CompilerDecl.cpp
39587 views
//===-- CompilerDecl.cpp --------------------------------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#include "lldb/Symbol/CompilerDecl.h"9#include "lldb/Symbol/CompilerDeclContext.h"10#include "lldb/Symbol/TypeSystem.h"11#include "lldb/Utility/Scalar.h"1213using namespace lldb_private;1415ConstString CompilerDecl::GetName() const {16return m_type_system->DeclGetName(m_opaque_decl);17}1819ConstString CompilerDecl::GetMangledName() const {20return m_type_system->DeclGetMangledName(m_opaque_decl);21}2223CompilerDeclContext CompilerDecl::GetDeclContext() const {24return m_type_system->DeclGetDeclContext(m_opaque_decl);25}2627CompilerType CompilerDecl::GetType() const {28return m_type_system->GetTypeForDecl(m_opaque_decl);29}3031CompilerType CompilerDecl::GetFunctionReturnType() const {32return m_type_system->DeclGetFunctionReturnType(m_opaque_decl);33}3435size_t CompilerDecl::GetNumFunctionArguments() const {36return m_type_system->DeclGetFunctionNumArguments(m_opaque_decl);37}3839CompilerType CompilerDecl::GetFunctionArgumentType(size_t arg_idx) const {40return m_type_system->DeclGetFunctionArgumentType(m_opaque_decl, arg_idx);41}4243bool lldb_private::operator==(const lldb_private::CompilerDecl &lhs,44const lldb_private::CompilerDecl &rhs) {45return lhs.GetTypeSystem() == rhs.GetTypeSystem() &&46lhs.GetOpaqueDecl() == rhs.GetOpaqueDecl();47}4849bool lldb_private::operator!=(const lldb_private::CompilerDecl &lhs,50const lldb_private::CompilerDecl &rhs) {51return lhs.GetTypeSystem() != rhs.GetTypeSystem() ||52lhs.GetOpaqueDecl() != rhs.GetOpaqueDecl();53}5455std::vector<lldb_private::CompilerContext>56CompilerDecl::GetCompilerContext() const {57return m_type_system->DeclGetCompilerContext(m_opaque_decl);58}5960Scalar CompilerDecl::GetConstantValue() const {61return m_type_system->DeclGetConstantValue(m_opaque_decl);62}636465