class.h 1.1 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_CLASS_H_
  5. #define CARBON_TOOLCHAIN_CHECK_CLASS_H_
  6. #include "toolchain/check/context.h"
  7. namespace Carbon::Check {
  8. // Sets the `Self` type for the class.
  9. auto SetClassSelfType(Context& context, SemIR::ClassId class_id) -> void;
  10. // Starts the class definition, adding `Self` to name lookup.
  11. auto StartClassDefinition(Context& context, SemIR::Class& class_info,
  12. SemIR::InstId definition_id) -> void;
  13. // Computes the object representation for a fully defined class.
  14. auto ComputeClassObjectRepr(Context& context, Parse::ClassDefinitionId node_id,
  15. SemIR::ClassId class_id,
  16. llvm::ArrayRef<SemIR::InstId> field_decls,
  17. llvm::ArrayRef<SemIR::InstId> vtable_contents,
  18. llvm::ArrayRef<SemIR::InstId> body) -> void;
  19. } // namespace Carbon::Check
  20. #endif // CARBON_TOOLCHAIN_CHECK_CLASS_H_