impl_lookup.h 851 B

1234567891011121314151617181920212223
  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::Invalid` if the type is not known to implement the
  11. // interface.
  12. auto LookupInterfaceWitness(Context& context, SemIR::LocId loc_id,
  13. SemIR::ConstantId type_const_id,
  14. SemIR::ConstantId interface_const_id)
  15. -> SemIR::InstId;
  16. } // namespace Carbon::Check
  17. #endif // CARBON_TOOLCHAIN_CHECK_IMPL_LOOKUP_H_