impl_lookup.h 829 B

12345678910111213141516171819202122
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. #ifndef CARBON_TOOLCHAIN_CHECK_IMPL_LOOKUP_H_
  5. #define CARBON_TOOLCHAIN_CHECK_IMPL_LOOKUP_H_
  6. #include "toolchain/check/context.h"
  7. #include "toolchain/sem_ir/ids.h"
  8. namespace Carbon::Check {
  9. // Looks up the witness to use for a particular type and interface. Returns the
  10. // witness, or `InstId::None` if the type is not known to implement the
  11. // interface.
  12. auto LookupImplWitness(Context& context, SemIR::LocId loc_id,
  13. SemIR::ConstantId type_const_id,
  14. SemIR::ConstantId interface_const_id) -> SemIR::InstId;
  15. } // namespace Carbon::Check
  16. #endif // CARBON_TOOLCHAIN_CHECK_IMPL_LOOKUP_H_