Files
carbon-lang/toolchain/check/impl_lookup.h
T
Richard Smith af816cda90 Move impl lookup out into its own file. (#4435)
In preparation for adding more logic here. This code doesn't belong in
member access.
2024-10-22 17:19:21 +00:00

24 lines
851 B
C++

// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#ifndef CARBON_TOOLCHAIN_CHECK_IMPL_LOOKUP_H_
#define CARBON_TOOLCHAIN_CHECK_IMPL_LOOKUP_H_
#include "toolchain/check/context.h"
#include "toolchain/sem_ir/ids.h"
namespace Carbon::Check {
// Looks up the witness to use for a particular type and interface. Returns the
// witness, or `InstId::Invalid` if the type is not known to implement the
// interface.
auto LookupInterfaceWitness(Context& context, SemIR::LocId loc_id,
SemIR::ConstantId type_const_id,
SemIR::ConstantId interface_const_id)
-> SemIR::InstId;
} // namespace Carbon::Check
#endif // CARBON_TOOLCHAIN_CHECK_IMPL_LOOKUP_H_