bool
GoASTContext::IsGoInterface(const lldb_private::CompilerType &type)
{
    if (!type.IsValid() || !llvm::dyn_cast_or_null<GoASTContext>(type.GetTypeSystem()))
        return false;
    return GoType::KIND_INTERFACE == static_cast<GoType *>(type.GetOpaqueQualType())->GetGoKind();
}
void
GoASTContext::CompleteStructType(const lldb_private::CompilerType &struct_type)
{
    if (!struct_type)
        return;
    GoASTContext *ast = llvm::dyn_cast_or_null<GoASTContext>(struct_type.GetTypeSystem());
    if (!ast)
        return;
    GoType *type = static_cast<GoType *>(struct_type.GetOpaqueQualType());
    if (GoStruct *s = type->GetStruct())
        s->SetComplete();
}
void
GoASTContext::AddFieldToStruct(const lldb_private::CompilerType &struct_type, const lldb_private::ConstString &name,
                               const lldb_private::CompilerType &field_type, uint32_t byte_offset)
{
    if (!struct_type)
        return;
    GoASTContext *ast = llvm::dyn_cast_or_null<GoASTContext>(struct_type.GetTypeSystem());
    if (!ast)
        return;
    GoType *type = static_cast<GoType *>(struct_type.GetOpaqueQualType());
    if (GoStruct *s = type->GetStruct())
        s->AddField(name, field_type, byte_offset);
}
Beispiel #4
0
bool
lldb_private::operator != (const lldb_private::CompilerType &lhs, const lldb_private::CompilerType &rhs)
{
    return lhs.GetTypeSystem() != rhs.GetTypeSystem() || lhs.GetOpaqueQualType() != rhs.GetOpaqueQualType();
}