From b1af08fed015794d72fa5b68694fa76b706bcbf6 Mon Sep 17 00:00:00 2001 From: Jon Meow <46229924+jonmeow@users.noreply.github.com> Date: Mon, 20 Sep 2021 15:15:30 -0700 Subject: [PATCH] Rename ptr.h to nonnull.h (#839) --- executable_semantics/ast/BUILD | 2 +- executable_semantics/ast/ast.h | 2 +- executable_semantics/ast/declaration.h | 2 +- executable_semantics/ast/source_location.h | 2 +- executable_semantics/common/BUILD | 6 +++--- executable_semantics/common/arena.h | 2 +- executable_semantics/common/{ptr.h => nonnull.h} | 6 +++--- executable_semantics/interpreter/type_checker.h | 2 +- executable_semantics/interpreter/value.h | 2 +- executable_semantics/syntax/parser.ypp | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) rename executable_semantics/common/{ptr.h => nonnull.h} (81%) diff --git a/executable_semantics/ast/BUILD b/executable_semantics/ast/BUILD index fc08eab60345..26e9cd30cee0 100644 --- a/executable_semantics/ast/BUILD +++ b/executable_semantics/ast/BUILD @@ -37,7 +37,7 @@ cc_library( ":pattern", ":source_location", "//common:ostream", - "//executable_semantics/common:ptr", + "//executable_semantics/common:nonnull", "@llvm-project//llvm:Support", ], ) diff --git a/executable_semantics/ast/ast.h b/executable_semantics/ast/ast.h index 4b637c6c3c72..ab599b2eb43f 100644 --- a/executable_semantics/ast/ast.h +++ b/executable_semantics/ast/ast.h @@ -9,7 +9,7 @@ #include "executable_semantics/ast/declaration.h" #include "executable_semantics/ast/library_name.h" -#include "executable_semantics/common/ptr.h" +#include "executable_semantics/common/nonnull.h" namespace Carbon { diff --git a/executable_semantics/ast/declaration.h b/executable_semantics/ast/declaration.h index cfb0a17f7bff..4db1063b1ff0 100644 --- a/executable_semantics/ast/declaration.h +++ b/executable_semantics/ast/declaration.h @@ -14,7 +14,7 @@ #include "executable_semantics/ast/member.h" #include "executable_semantics/ast/pattern.h" #include "executable_semantics/ast/source_location.h" -#include "executable_semantics/common/ptr.h" +#include "executable_semantics/common/nonnull.h" #include "llvm/Support/Compiler.h" namespace Carbon { diff --git a/executable_semantics/ast/source_location.h b/executable_semantics/ast/source_location.h index 49f87c03a1e8..b784849b9b09 100644 --- a/executable_semantics/ast/source_location.h +++ b/executable_semantics/ast/source_location.h @@ -9,7 +9,7 @@ #include #include "common/ostream.h" -#include "executable_semantics/common/ptr.h" +#include "executable_semantics/common/nonnull.h" namespace Carbon { diff --git a/executable_semantics/common/BUILD b/executable_semantics/common/BUILD index d5f5d1dbf1a8..be405b9e2508 100644 --- a/executable_semantics/common/BUILD +++ b/executable_semantics/common/BUILD @@ -8,7 +8,7 @@ cc_library( name = "arena", hdrs = ["arena.h"], deps = [ - ":ptr", + ":nonnull", ], ) @@ -31,8 +31,8 @@ cc_test( ) cc_library( - name = "ptr", - hdrs = ["ptr.h"], + name = "nonnull", + hdrs = ["nonnull.h"], deps = [ "//common:check", "@llvm-project//llvm:Support", diff --git a/executable_semantics/common/arena.h b/executable_semantics/common/arena.h index a6cb2c387f69..1da5a8317e1e 100644 --- a/executable_semantics/common/arena.h +++ b/executable_semantics/common/arena.h @@ -8,7 +8,7 @@ #include #include -#include "executable_semantics/common/ptr.h" +#include "executable_semantics/common/nonnull.h" namespace Carbon { diff --git a/executable_semantics/common/ptr.h b/executable_semantics/common/nonnull.h similarity index 81% rename from executable_semantics/common/ptr.h rename to executable_semantics/common/nonnull.h index b3cc5f174189..e22788a2761f 100644 --- a/executable_semantics/common/ptr.h +++ b/executable_semantics/common/nonnull.h @@ -2,8 +2,8 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#ifndef EXECUTABLE_SEMANTICS_COMMON_PTR_H_ -#define EXECUTABLE_SEMANTICS_COMMON_PTR_H_ +#ifndef EXECUTABLE_SEMANTICS_COMMON_NONNULL_H_ +#define EXECUTABLE_SEMANTICS_COMMON_NONNULL_H_ #include @@ -19,4 +19,4 @@ using Nonnull = T _Nonnull; } // namespace Carbon -#endif // EXECUTABLE_SEMANTICS_COMMON_PTR_H_ +#endif // EXECUTABLE_SEMANTICS_COMMON_NONNULL_H_ diff --git a/executable_semantics/interpreter/type_checker.h b/executable_semantics/interpreter/type_checker.h index a7a8141b6fcd..bfa70ef99807 100644 --- a/executable_semantics/interpreter/type_checker.h +++ b/executable_semantics/interpreter/type_checker.h @@ -10,7 +10,7 @@ #include "common/ostream.h" #include "executable_semantics/ast/expression.h" #include "executable_semantics/ast/statement.h" -#include "executable_semantics/common/ptr.h" +#include "executable_semantics/common/nonnull.h" #include "executable_semantics/interpreter/dictionary.h" #include "executable_semantics/interpreter/interpreter.h" diff --git a/executable_semantics/interpreter/value.h b/executable_semantics/interpreter/value.h index 4ac8c4dfc53d..859a4a5f6a0d 100644 --- a/executable_semantics/interpreter/value.h +++ b/executable_semantics/interpreter/value.h @@ -13,7 +13,7 @@ #include "common/ostream.h" #include "executable_semantics/ast/function_definition.h" #include "executable_semantics/ast/statement.h" -#include "executable_semantics/common/ptr.h" +#include "executable_semantics/common/nonnull.h" #include "executable_semantics/interpreter/address.h" #include "executable_semantics/interpreter/field_path.h" #include "executable_semantics/interpreter/stack.h" diff --git a/executable_semantics/syntax/parser.ypp b/executable_semantics/syntax/parser.ypp index 4f88da2a8019..a95cbfd3d58a 100644 --- a/executable_semantics/syntax/parser.ypp +++ b/executable_semantics/syntax/parser.ypp @@ -72,7 +72,7 @@ #include "executable_semantics/ast/paren_contents.h" #include "executable_semantics/ast/pattern.h" #include "executable_semantics/common/arena.h" - #include "executable_semantics/common/ptr.h" + #include "executable_semantics/common/nonnull.h" namespace Carbon { class ParseAndLexContext;