//===- AddressSpaces.h - Language-specific address spaces -------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // /// \file /// Provides definitions for the various language-specific address /// spaces. // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_BASIC_ADDRESSSPACES_H #define LLVM_CLANG_BASIC_ADDRESSSPACES_H #include <cassert> namespace clang { /// Defines the address space values used by the address space qualifier /// of QualType. /// enum class LangAS : unsigned { … }; /// The type of a lookup table which maps from language-specific address spaces /// to target-specific ones. LangASMap; /// \return whether \p AS is a target-specific address space rather than a /// clang AST address space inline bool isTargetAddressSpace(LangAS AS) { … } inline unsigned toTargetAddressSpace(LangAS AS) { … } inline LangAS getLangASFromTargetAS(unsigned TargetAS) { … } inline bool isPtrSizeAddressSpace(LangAS AS) { … } } // namespace clang #endif // LLVM_CLANG_BASIC_ADDRESSSPACES_H