ptr.h 507 B

12345678910111213141516
  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 EXECUTABLE_SEMANTICS_COMMON_PTR_H_
  5. #define EXECUTABLE_SEMANTICS_COMMON_PTR_H_
  6. namespace Carbon {
  7. // A non-nullable pointer. Written as `Ptr<T>` instead of `T*`.
  8. template <typename T>
  9. using Ptr = T* _Nonnull __attribute__((nonnull));
  10. } // namespace Carbon
  11. #endif // EXECUTABLE_SEMANTICS_COMMON_PTR_H_