access.h 830 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_CPP_ACCESS_H_
  5. #define CARBON_TOOLCHAIN_CHECK_CPP_ACCESS_H_
  6. #include "toolchain/sem_ir/name_scope.h"
  7. namespace Carbon::Check {
  8. // Calculates the effective access kind from the given (declaration, lookup
  9. // access) pair.
  10. auto MapCppAccess(clang::DeclAccessPair access_pair) -> SemIR::AccessKind;
  11. // Maps a Carbon access kind to a C++ access specifier, suitable for use when
  12. // declaring a C++ class member with the same access. Never returns AS_none.
  13. auto MapToCppAccess(SemIR::AccessKind access) -> clang::AccessSpecifier;
  14. } // namespace Carbon::Check
  15. #endif // CARBON_TOOLCHAIN_CHECK_CPP_ACCESS_H_