llvm/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp

//===-- CPlusPlusLanguage.cpp ---------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "CPlusPlusLanguage.h"

#include <cctype>
#include <cstring>

#include <functional>
#include <memory>
#include <mutex>
#include <set>

#include "llvm/ADT/StringRef.h"
#include "llvm/Demangle/ItaniumDemangle.h"

#include "lldb/Core/Mangled.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/PluginManager.h"
#include "lldb/Core/UniqueCStringMap.h"
#include "lldb/Core/ValueObjectVariable.h"
#include "lldb/DataFormatters/CXXFunctionPointer.h"
#include "lldb/DataFormatters/DataVisualization.h"
#include "lldb/DataFormatters/FormattersHelpers.h"
#include "lldb/DataFormatters/VectorType.h"
#include "lldb/Symbol/SymbolFile.h"
#include "lldb/Symbol/VariableList.h"
#include "lldb/Utility/ConstString.h"
#include "lldb/Utility/LLDBLog.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/RegularExpression.h"

#include "BlockPointer.h"
#include "CPlusPlusNameParser.h"
#include "Coroutines.h"
#include "CxxStringTypes.h"
#include "Generic.h"
#include "LibCxx.h"
#include "LibCxxAtomic.h"
#include "LibCxxVariant.h"
#include "LibStdcpp.h"
#include "MSVCUndecoratedNameParser.h"
#include "lldb/lldb-enumerations.h"

usingnamespacelldb;
usingnamespacelldb_private;
usingnamespacelldb_private::formatters;

LLDB_PLUGIN_DEFINE()

void CPlusPlusLanguage::Initialize() {}

void CPlusPlusLanguage::Terminate() {}

bool CPlusPlusLanguage::SymbolNameFitsToLanguage(Mangled mangled) const {}

ConstString CPlusPlusLanguage::GetDemangledFunctionNameWithoutArguments(
    Mangled mangled) const {}

// Static Functions

Language *CPlusPlusLanguage::CreateInstance(lldb::LanguageType language) {}

void CPlusPlusLanguage::MethodName::Clear() {}

static bool ReverseFindMatchingChars(const llvm::StringRef &s,
                                     const llvm::StringRef &left_right_chars,
                                     size_t &left_pos, size_t &right_pos,
                                     size_t pos = llvm::StringRef::npos) {}

static bool IsTrivialBasename(const llvm::StringRef &basename) {}

/// Writes out the function name in 'full_name' to 'out_stream'
/// but replaces each argument type with the variable name
/// and the corresponding pretty-printed value
static bool PrettyPrintFunctionNameWithArgs(Stream &out_stream,
                                            char const *full_name,
                                            ExecutionContextScope *exe_scope,
                                            VariableList const &args) {}

bool CPlusPlusLanguage::MethodName::TrySimplifiedParse() {}

void CPlusPlusLanguage::MethodName::Parse() {}

llvm::StringRef CPlusPlusLanguage::MethodName::GetBasename() {}

llvm::StringRef CPlusPlusLanguage::MethodName::GetContext() {}

llvm::StringRef CPlusPlusLanguage::MethodName::GetArguments() {}

llvm::StringRef CPlusPlusLanguage::MethodName::GetQualifiers() {}

llvm::StringRef CPlusPlusLanguage::MethodName::GetReturnType() {}

std::string CPlusPlusLanguage::MethodName::GetScopeQualifiedName() {}

llvm::StringRef
CPlusPlusLanguage::MethodName::GetBasenameNoTemplateParameters() {}

bool CPlusPlusLanguage::MethodName::ContainsPath(llvm::StringRef path) {}

bool CPlusPlusLanguage::IsCPPMangledName(llvm::StringRef name) {}

bool CPlusPlusLanguage::DemangledNameContainsPath(llvm::StringRef path,
                                                  ConstString demangled) const {}

bool CPlusPlusLanguage::ExtractContextAndIdentifier(
    const char *name, llvm::StringRef &context, llvm::StringRef &identifier) {}

namespace {
class NodeAllocator {};

template <typename Derived>
class ManglingSubstitutor
    : public llvm::itanium_demangle::AbstractManglingParser<Derived,
                                                            NodeAllocator> {};

/// Given a mangled function `Mangled`, replace all the primitive function type
/// arguments of `Search` with type `Replace`.
class TypeSubstitutor : public ManglingSubstitutor<TypeSubstitutor> {};

class CtorDtorSubstitutor : public ManglingSubstitutor<CtorDtorSubstitutor> {};
} // namespace

std::vector<ConstString> CPlusPlusLanguage::GenerateAlternateFunctionManglings(
    const ConstString mangled_name) const {}

ConstString CPlusPlusLanguage::FindBestAlternateFunctionMangledName(
    const Mangled mangled, const SymbolContext &sym_ctx) const {}

static void LoadLibCxxFormatters(lldb::TypeCategoryImplSP cpp_category_sp) {}

static void LoadLibStdcppFormatters(lldb::TypeCategoryImplSP cpp_category_sp) {}

static void LoadSystemFormatters(lldb::TypeCategoryImplSP cpp_category_sp) {}

std::unique_ptr<Language::TypeScavenger> CPlusPlusLanguage::GetTypeScavenger() {}

lldb::TypeCategoryImplSP CPlusPlusLanguage::GetFormatters() {}

HardcodedFormatters::HardcodedSummaryFinder
CPlusPlusLanguage::GetHardcodedSummaries() {}

HardcodedFormatters::HardcodedSyntheticFinder
CPlusPlusLanguage::GetHardcodedSynthetics() {}

bool CPlusPlusLanguage::IsNilReference(ValueObject &valobj) {}

bool CPlusPlusLanguage::IsSourceFile(llvm::StringRef file_path) const {}

bool CPlusPlusLanguage::GetFunctionDisplayName(
    const SymbolContext *sc, const ExecutionContext *exe_ctx,
    FunctionNameRepresentation representation, Stream &s) {}