member_access.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_MEMBER_ACCESS_H_
  5. #define CARBON_TOOLCHAIN_CHECK_MEMBER_ACCESS_H_
  6. #include "toolchain/check/context.h"
  7. #include "toolchain/sem_ir/ids.h"
  8. namespace Carbon::Check {
  9. // Creates SemIR to perform a member access with base expression `base_id` and
  10. // member name `name_id`. Returns the result of the access.
  11. auto PerformMemberAccess(Context& context, Parse::NodeId node_id,
  12. SemIR::InstId base_id, SemIR::NameId name_id)
  13. -> SemIR::InstId;
  14. // Creates SemIR to perform a compound member access with base expression
  15. // `base_id` and member name expression `member_expr_id`. Returns the result of
  16. // the access.
  17. auto PerformCompoundMemberAccess(Context& context, Parse::NodeId node_id,
  18. SemIR::InstId base_id,
  19. SemIR::InstId member_expr_id) -> SemIR::InstId;
  20. } // namespace Carbon::Check
  21. #endif // CARBON_TOOLCHAIN_CHECK_MEMBER_ACCESS_H_