impl.h 1.0 KB

12345678910111213141516171819202122232425262728
  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_H_
  5. #define CARBON_TOOLCHAIN_CHECK_IMPL_H_
  6. #include "toolchain/check/context.h"
  7. #include "toolchain/sem_ir/ids.h"
  8. namespace Carbon::Check {
  9. // Returns the initial witness value for a new impl declaration.
  10. auto ImplWitnessForDeclaration(Context& context, const SemIR::Impl& impl)
  11. -> SemIR::InstId;
  12. // Update `impl`'s witness at the start of a definition.
  13. auto ImplWitnessStartDefinition(Context& context, SemIR::Impl& impl) -> void;
  14. // Adds the function members to the witness for `impl`.
  15. auto FinishImplWitness(Context& context, SemIR::Impl& impl) -> void;
  16. // Sets all unset members of the witness for `impl` to the error instruction.
  17. auto FillImplWitnessWithErrors(Context& context, SemIR::Impl& impl) -> void;
  18. } // namespace Carbon::Check
  19. #endif // CARBON_TOOLCHAIN_CHECK_IMPL_H_