Path: blob/main/contrib/llvm-project/lldb/source/Plugins/Language/CPlusPlus/Generic.cpp
213845 views
//===-- Generic.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 "Generic.h"9#include "LibStdcpp.h"10#include "MsvcStl.h"1112lldb::ValueObjectSP lldb_private::formatters::GetDesugaredSmartPointerValue(13ValueObject &ptr, ValueObject &container) {14auto container_type = container.GetCompilerType().GetNonReferenceType();15if (!container_type)16return nullptr;1718auto arg = container_type.GetTypeTemplateArgument(0);19if (!arg)20// If there isn't enough debug info, use the pointer type as is21return ptr.GetSP();2223return ptr.Cast(arg.GetPointerType());24}252627