blob: b237a8a27090c0e3d1e317bf05753c2984c23632 [file] [log] [blame] [edit]
//===-- Generic.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 "Generic.h"
lldb::ValueObjectSP lldb_private::formatters::GetDesugaredSmartPointerValue(
ValueObject &ptr, ValueObject &container) {
auto container_type = container.GetCompilerType().GetNonReferenceType();
if (!container_type)
return nullptr;
auto arg = container_type.GetTypeTemplateArgument(0);
if (!arg)
return nullptr;
return ptr.Cast(arg.GetPointerType());
}