Rename StorageClass to AddressSpace.

This CL updates the internals to use AddressSpace instead of the old
StorageClass name.

Bug: tint:1404
Change-Id: Iecc208e839453437f4d630f65e0152206a52db7e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104420
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
diff --git a/src/tint/sem/function.cc b/src/tint/sem/function.cc
index fc7809b..af2ee12 100644
--- a/src/tint/sem/function.cc
+++ b/src/tint/sem/function.cc
@@ -68,7 +68,7 @@
     VariableBindings ret;
 
     for (auto* global : TransitivelyReferencedGlobals()) {
-        if (global->StorageClass() != ast::StorageClass::kUniform) {
+        if (global->AddressSpace() != ast::AddressSpace::kUniform) {
             continue;
         }
 
@@ -83,7 +83,7 @@
     VariableBindings ret;
 
     for (auto* global : TransitivelyReferencedGlobals()) {
-        if (global->StorageClass() != ast::StorageClass::kStorage) {
+        if (global->AddressSpace() != ast::AddressSpace::kStorage) {
             continue;
         }
 
diff --git a/src/tint/sem/pointer.cc b/src/tint/sem/pointer.cc
index e00a4bf..3918233 100644
--- a/src/tint/sem/pointer.cc
+++ b/src/tint/sem/pointer.cc
@@ -22,19 +22,19 @@
 
 namespace tint::sem {
 
-Pointer::Pointer(const Type* subtype, ast::StorageClass storage_class, ast::Access access)
-    : subtype_(subtype), storage_class_(storage_class), access_(access) {
+Pointer::Pointer(const Type* subtype, ast::AddressSpace address_space, ast::Access access)
+    : subtype_(subtype), address_space_(address_space), access_(access) {
     TINT_ASSERT(Semantic, !subtype->Is<Reference>());
     TINT_ASSERT(Semantic, access != ast::Access::kUndefined);
 }
 
 size_t Pointer::Hash() const {
-    return utils::Hash(TypeInfo::Of<Pointer>().full_hashcode, storage_class_, subtype_, access_);
+    return utils::Hash(TypeInfo::Of<Pointer>().full_hashcode, address_space_, subtype_, access_);
 }
 
 bool Pointer::Equals(const sem::Type& other) const {
     if (auto* o = other.As<Pointer>()) {
-        return o->storage_class_ == storage_class_ && o->subtype_ == subtype_ &&
+        return o->address_space_ == address_space_ && o->subtype_ == subtype_ &&
                o->access_ == access_;
     }
     return false;
@@ -43,8 +43,8 @@
 std::string Pointer::FriendlyName(const SymbolTable& symbols) const {
     std::ostringstream out;
     out << "ptr<";
-    if (storage_class_ != ast::StorageClass::kNone) {
-        out << storage_class_ << ", ";
+    if (address_space_ != ast::AddressSpace::kNone) {
+        out << address_space_ << ", ";
     }
     out << subtype_->FriendlyName(symbols) << ", " << access_;
     out << ">";
diff --git a/src/tint/sem/pointer.h b/src/tint/sem/pointer.h
index 0c82e77..806dcaa 100644
--- a/src/tint/sem/pointer.h
+++ b/src/tint/sem/pointer.h
@@ -18,7 +18,7 @@
 #include <string>
 
 #include "src/tint/ast/access.h"
-#include "src/tint/ast/storage_class.h"
+#include "src/tint/ast/address_space.h"
 #include "src/tint/sem/type.h"
 
 namespace tint::sem {
@@ -28,9 +28,9 @@
   public:
     /// Constructor
     /// @param subtype the pointee type
-    /// @param storage_class the storage class of the pointer
+    /// @param address_space the address space of the pointer
     /// @param access the resolved access control of the reference
-    Pointer(const Type* subtype, ast::StorageClass storage_class, ast::Access access);
+    Pointer(const Type* subtype, ast::AddressSpace address_space, ast::Access access);
 
     /// Move constructor
     Pointer(Pointer&&);
@@ -46,8 +46,8 @@
     /// @returns the pointee type
     const Type* StoreType() const { return subtype_; }
 
-    /// @returns the storage class of the pointer
-    ast::StorageClass StorageClass() const { return storage_class_; }
+    /// @returns the address space of the pointer
+    ast::AddressSpace AddressSpace() const { return address_space_; }
 
     /// @returns the access control of the reference
     ast::Access Access() const { return access_; }
@@ -59,7 +59,7 @@
 
   private:
     Type const* const subtype_;
-    ast::StorageClass const storage_class_;
+    ast::AddressSpace const address_space_;
     ast::Access const access_;
 };
 
diff --git a/src/tint/sem/pointer_test.cc b/src/tint/sem/pointer_test.cc
index 575db41..4f7533e 100644
--- a/src/tint/sem/pointer_test.cc
+++ b/src/tint/sem/pointer_test.cc
@@ -21,14 +21,14 @@
 using PointerTest = TestHelper;
 
 TEST_F(PointerTest, Creation) {
-    auto* a = create<Pointer>(create<I32>(), ast::StorageClass::kStorage, ast::Access::kReadWrite);
-    auto* b = create<Pointer>(create<I32>(), ast::StorageClass::kStorage, ast::Access::kReadWrite);
-    auto* c = create<Pointer>(create<F32>(), ast::StorageClass::kStorage, ast::Access::kReadWrite);
-    auto* d = create<Pointer>(create<I32>(), ast::StorageClass::kPrivate, ast::Access::kReadWrite);
-    auto* e = create<Pointer>(create<I32>(), ast::StorageClass::kStorage, ast::Access::kRead);
+    auto* a = create<Pointer>(create<I32>(), ast::AddressSpace::kStorage, ast::Access::kReadWrite);
+    auto* b = create<Pointer>(create<I32>(), ast::AddressSpace::kStorage, ast::Access::kReadWrite);
+    auto* c = create<Pointer>(create<F32>(), ast::AddressSpace::kStorage, ast::Access::kReadWrite);
+    auto* d = create<Pointer>(create<I32>(), ast::AddressSpace::kPrivate, ast::Access::kReadWrite);
+    auto* e = create<Pointer>(create<I32>(), ast::AddressSpace::kStorage, ast::Access::kRead);
 
     EXPECT_TRUE(a->StoreType()->Is<sem::I32>());
-    EXPECT_EQ(a->StorageClass(), ast::StorageClass::kStorage);
+    EXPECT_EQ(a->AddressSpace(), ast::AddressSpace::kStorage);
     EXPECT_EQ(a->Access(), ast::Access::kReadWrite);
 
     EXPECT_EQ(a, b);
@@ -38,11 +38,11 @@
 }
 
 TEST_F(PointerTest, Hash) {
-    auto* a = create<Pointer>(create<I32>(), ast::StorageClass::kStorage, ast::Access::kReadWrite);
-    auto* b = create<Pointer>(create<I32>(), ast::StorageClass::kStorage, ast::Access::kReadWrite);
-    auto* c = create<Pointer>(create<F32>(), ast::StorageClass::kStorage, ast::Access::kReadWrite);
-    auto* d = create<Pointer>(create<I32>(), ast::StorageClass::kPrivate, ast::Access::kReadWrite);
-    auto* e = create<Pointer>(create<I32>(), ast::StorageClass::kStorage, ast::Access::kRead);
+    auto* a = create<Pointer>(create<I32>(), ast::AddressSpace::kStorage, ast::Access::kReadWrite);
+    auto* b = create<Pointer>(create<I32>(), ast::AddressSpace::kStorage, ast::Access::kReadWrite);
+    auto* c = create<Pointer>(create<F32>(), ast::AddressSpace::kStorage, ast::Access::kReadWrite);
+    auto* d = create<Pointer>(create<I32>(), ast::AddressSpace::kPrivate, ast::Access::kReadWrite);
+    auto* e = create<Pointer>(create<I32>(), ast::AddressSpace::kStorage, ast::Access::kRead);
 
     EXPECT_EQ(a->Hash(), b->Hash());
     EXPECT_NE(a->Hash(), c->Hash());
@@ -51,11 +51,11 @@
 }
 
 TEST_F(PointerTest, Equals) {
-    auto* a = create<Pointer>(create<I32>(), ast::StorageClass::kStorage, ast::Access::kReadWrite);
-    auto* b = create<Pointer>(create<I32>(), ast::StorageClass::kStorage, ast::Access::kReadWrite);
-    auto* c = create<Pointer>(create<F32>(), ast::StorageClass::kStorage, ast::Access::kReadWrite);
-    auto* d = create<Pointer>(create<I32>(), ast::StorageClass::kPrivate, ast::Access::kReadWrite);
-    auto* e = create<Pointer>(create<I32>(), ast::StorageClass::kStorage, ast::Access::kRead);
+    auto* a = create<Pointer>(create<I32>(), ast::AddressSpace::kStorage, ast::Access::kReadWrite);
+    auto* b = create<Pointer>(create<I32>(), ast::AddressSpace::kStorage, ast::Access::kReadWrite);
+    auto* c = create<Pointer>(create<F32>(), ast::AddressSpace::kStorage, ast::Access::kReadWrite);
+    auto* d = create<Pointer>(create<I32>(), ast::AddressSpace::kPrivate, ast::Access::kReadWrite);
+    auto* e = create<Pointer>(create<I32>(), ast::AddressSpace::kStorage, ast::Access::kRead);
 
     EXPECT_TRUE(a->Equals(*b));
     EXPECT_FALSE(a->Equals(*c));
@@ -65,12 +65,12 @@
 }
 
 TEST_F(PointerTest, FriendlyName) {
-    auto* r = create<Pointer>(create<I32>(), ast::StorageClass::kNone, ast::Access::kRead);
+    auto* r = create<Pointer>(create<I32>(), ast::AddressSpace::kNone, ast::Access::kRead);
     EXPECT_EQ(r->FriendlyName(Symbols()), "ptr<i32, read>");
 }
 
-TEST_F(PointerTest, FriendlyNameWithStorageClass) {
-    auto* r = create<Pointer>(create<I32>(), ast::StorageClass::kWorkgroup, ast::Access::kRead);
+TEST_F(PointerTest, FriendlyNameWithAddressSpace) {
+    auto* r = create<Pointer>(create<I32>(), ast::AddressSpace::kWorkgroup, ast::Access::kRead);
     EXPECT_EQ(r->FriendlyName(Symbols()), "ptr<workgroup, i32, read>");
 }
 
diff --git a/src/tint/sem/reference.cc b/src/tint/sem/reference.cc
index 4751563..a3a9f24 100644
--- a/src/tint/sem/reference.cc
+++ b/src/tint/sem/reference.cc
@@ -21,19 +21,19 @@
 
 namespace tint::sem {
 
-Reference::Reference(const Type* subtype, ast::StorageClass storage_class, ast::Access access)
-    : subtype_(subtype), storage_class_(storage_class), access_(access) {
+Reference::Reference(const Type* subtype, ast::AddressSpace address_space, ast::Access access)
+    : subtype_(subtype), address_space_(address_space), access_(access) {
     TINT_ASSERT(Semantic, !subtype->Is<Reference>());
     TINT_ASSERT(Semantic, access != ast::Access::kUndefined);
 }
 
 size_t Reference::Hash() const {
-    return utils::Hash(TypeInfo::Of<Reference>().full_hashcode, storage_class_, subtype_, access_);
+    return utils::Hash(TypeInfo::Of<Reference>().full_hashcode, address_space_, subtype_, access_);
 }
 
 bool Reference::Equals(const sem::Type& other) const {
     if (auto* o = other.As<Reference>()) {
-        return o->storage_class_ == storage_class_ && o->subtype_ == subtype_ &&
+        return o->address_space_ == address_space_ && o->subtype_ == subtype_ &&
                o->access_ == access_;
     }
     return false;
@@ -42,8 +42,8 @@
 std::string Reference::FriendlyName(const SymbolTable& symbols) const {
     std::ostringstream out;
     out << "ref<";
-    if (storage_class_ != ast::StorageClass::kNone) {
-        out << storage_class_ << ", ";
+    if (address_space_ != ast::AddressSpace::kNone) {
+        out << address_space_ << ", ";
     }
     out << subtype_->FriendlyName(symbols) << ", " << access_;
     out << ">";
diff --git a/src/tint/sem/reference.h b/src/tint/sem/reference.h
index 5db9b62..f843da6 100644
--- a/src/tint/sem/reference.h
+++ b/src/tint/sem/reference.h
@@ -18,7 +18,7 @@
 #include <string>
 
 #include "src/tint/ast/access.h"
-#include "src/tint/ast/storage_class.h"
+#include "src/tint/ast/address_space.h"
 #include "src/tint/sem/type.h"
 
 namespace tint::sem {
@@ -28,9 +28,9 @@
   public:
     /// Constructor
     /// @param subtype the pointee type
-    /// @param storage_class the storage class of the reference
+    /// @param address_space the address space of the reference
     /// @param access the resolved access control of the reference
-    Reference(const Type* subtype, ast::StorageClass storage_class, ast::Access access);
+    Reference(const Type* subtype, ast::AddressSpace address_space, ast::Access access);
 
     /// Move constructor
     Reference(Reference&&);
@@ -46,8 +46,8 @@
     /// @returns the pointee type
     const Type* StoreType() const { return subtype_; }
 
-    /// @returns the storage class of the reference
-    ast::StorageClass StorageClass() const { return storage_class_; }
+    /// @returns the address space of the reference
+    ast::AddressSpace AddressSpace() const { return address_space_; }
 
     /// @returns the resolved access control of the reference.
     ast::Access Access() const { return access_; }
@@ -59,7 +59,7 @@
 
   private:
     Type const* const subtype_;
-    ast::StorageClass const storage_class_;
+    ast::AddressSpace const address_space_;
     ast::Access const access_;
 };
 
diff --git a/src/tint/sem/reference_test.cc b/src/tint/sem/reference_test.cc
index 27b1ebd..53ba21b 100644
--- a/src/tint/sem/reference_test.cc
+++ b/src/tint/sem/reference_test.cc
@@ -22,17 +22,17 @@
 
 TEST_F(ReferenceTest, Creation) {
     auto* a =
-        create<Reference>(create<I32>(), ast::StorageClass::kStorage, ast::Access::kReadWrite);
+        create<Reference>(create<I32>(), ast::AddressSpace::kStorage, ast::Access::kReadWrite);
     auto* b =
-        create<Reference>(create<I32>(), ast::StorageClass::kStorage, ast::Access::kReadWrite);
+        create<Reference>(create<I32>(), ast::AddressSpace::kStorage, ast::Access::kReadWrite);
     auto* c =
-        create<Reference>(create<F32>(), ast::StorageClass::kStorage, ast::Access::kReadWrite);
+        create<Reference>(create<F32>(), ast::AddressSpace::kStorage, ast::Access::kReadWrite);
     auto* d =
-        create<Reference>(create<I32>(), ast::StorageClass::kPrivate, ast::Access::kReadWrite);
-    auto* e = create<Reference>(create<I32>(), ast::StorageClass::kStorage, ast::Access::kRead);
+        create<Reference>(create<I32>(), ast::AddressSpace::kPrivate, ast::Access::kReadWrite);
+    auto* e = create<Reference>(create<I32>(), ast::AddressSpace::kStorage, ast::Access::kRead);
 
     EXPECT_TRUE(a->StoreType()->Is<sem::I32>());
-    EXPECT_EQ(a->StorageClass(), ast::StorageClass::kStorage);
+    EXPECT_EQ(a->AddressSpace(), ast::AddressSpace::kStorage);
     EXPECT_EQ(a->Access(), ast::Access::kReadWrite);
 
     EXPECT_EQ(a, b);
@@ -43,14 +43,14 @@
 
 TEST_F(ReferenceTest, Hash) {
     auto* a =
-        create<Reference>(create<I32>(), ast::StorageClass::kStorage, ast::Access::kReadWrite);
+        create<Reference>(create<I32>(), ast::AddressSpace::kStorage, ast::Access::kReadWrite);
     auto* b =
-        create<Reference>(create<I32>(), ast::StorageClass::kStorage, ast::Access::kReadWrite);
+        create<Reference>(create<I32>(), ast::AddressSpace::kStorage, ast::Access::kReadWrite);
     auto* c =
-        create<Reference>(create<F32>(), ast::StorageClass::kStorage, ast::Access::kReadWrite);
+        create<Reference>(create<F32>(), ast::AddressSpace::kStorage, ast::Access::kReadWrite);
     auto* d =
-        create<Reference>(create<I32>(), ast::StorageClass::kPrivate, ast::Access::kReadWrite);
-    auto* e = create<Reference>(create<I32>(), ast::StorageClass::kStorage, ast::Access::kRead);
+        create<Reference>(create<I32>(), ast::AddressSpace::kPrivate, ast::Access::kReadWrite);
+    auto* e = create<Reference>(create<I32>(), ast::AddressSpace::kStorage, ast::Access::kRead);
 
     EXPECT_EQ(a->Hash(), b->Hash());
     EXPECT_NE(a->Hash(), c->Hash());
@@ -60,14 +60,14 @@
 
 TEST_F(ReferenceTest, Equals) {
     auto* a =
-        create<Reference>(create<I32>(), ast::StorageClass::kStorage, ast::Access::kReadWrite);
+        create<Reference>(create<I32>(), ast::AddressSpace::kStorage, ast::Access::kReadWrite);
     auto* b =
-        create<Reference>(create<I32>(), ast::StorageClass::kStorage, ast::Access::kReadWrite);
+        create<Reference>(create<I32>(), ast::AddressSpace::kStorage, ast::Access::kReadWrite);
     auto* c =
-        create<Reference>(create<F32>(), ast::StorageClass::kStorage, ast::Access::kReadWrite);
+        create<Reference>(create<F32>(), ast::AddressSpace::kStorage, ast::Access::kReadWrite);
     auto* d =
-        create<Reference>(create<I32>(), ast::StorageClass::kPrivate, ast::Access::kReadWrite);
-    auto* e = create<Reference>(create<I32>(), ast::StorageClass::kStorage, ast::Access::kRead);
+        create<Reference>(create<I32>(), ast::AddressSpace::kPrivate, ast::Access::kReadWrite);
+    auto* e = create<Reference>(create<I32>(), ast::AddressSpace::kStorage, ast::Access::kRead);
 
     EXPECT_TRUE(a->Equals(*b));
     EXPECT_FALSE(a->Equals(*c));
@@ -77,12 +77,12 @@
 }
 
 TEST_F(ReferenceTest, FriendlyName) {
-    auto* r = create<Reference>(create<I32>(), ast::StorageClass::kNone, ast::Access::kRead);
+    auto* r = create<Reference>(create<I32>(), ast::AddressSpace::kNone, ast::Access::kRead);
     EXPECT_EQ(r->FriendlyName(Symbols()), "ref<i32, read>");
 }
 
-TEST_F(ReferenceTest, FriendlyNameWithStorageClass) {
-    auto* r = create<Reference>(create<I32>(), ast::StorageClass::kWorkgroup, ast::Access::kRead);
+TEST_F(ReferenceTest, FriendlyNameWithAddressSpace) {
+    auto* r = create<Reference>(create<I32>(), ast::AddressSpace::kWorkgroup, ast::Access::kRead);
     EXPECT_EQ(r->FriendlyName(Symbols()), "ref<workgroup, i32, read>");
 }
 
diff --git a/src/tint/sem/struct.h b/src/tint/sem/struct.h
index 0f3213a..80ab53b 100644
--- a/src/tint/sem/struct.h
+++ b/src/tint/sem/struct.h
@@ -22,7 +22,7 @@
 #include <unordered_set>
 #include <vector>
 
-#include "src/tint/ast/storage_class.h"
+#include "src/tint/ast/address_space.h"
 #include "src/tint/ast/struct.h"
 #include "src/tint/sem/node.h"
 #include "src/tint/sem/type.h"
@@ -109,23 +109,23 @@
     /// alignment padding
     uint32_t SizeNoPadding() const { return size_no_padding_; }
 
-    /// Adds the StorageClass usage to the structure.
+    /// Adds the AddressSpace usage to the structure.
     /// @param usage the storage usage
-    void AddUsage(ast::StorageClass usage) { storage_class_usage_.emplace(usage); }
+    void AddUsage(ast::AddressSpace usage) { address_space_usage_.emplace(usage); }
 
-    /// @returns the set of storage class uses of this structure
-    const std::unordered_set<ast::StorageClass>& StorageClassUsage() const {
-        return storage_class_usage_;
+    /// @returns the set of address space uses of this structure
+    const std::unordered_set<ast::AddressSpace>& AddressSpaceUsage() const {
+        return address_space_usage_;
     }
 
-    /// @param usage the ast::StorageClass usage type to query
-    /// @returns true iff this structure has been used as the given storage class
-    bool UsedAs(ast::StorageClass usage) const { return storage_class_usage_.count(usage) > 0; }
+    /// @param usage the ast::AddressSpace usage type to query
+    /// @returns true iff this structure has been used as the given address space
+    bool UsedAs(ast::AddressSpace usage) const { return address_space_usage_.count(usage) > 0; }
 
-    /// @returns true iff this structure has been used by storage class that's
+    /// @returns true iff this structure has been used by address space that's
     /// host-shareable.
     bool IsHostShareable() const {
-        for (auto sc : storage_class_usage_) {
+        for (auto sc : address_space_usage_) {
             if (ast::IsHostShareable(sc)) {
                 return true;
             }
@@ -165,7 +165,7 @@
     const uint32_t align_;
     const uint32_t size_;
     const uint32_t size_no_padding_;
-    std::unordered_set<ast::StorageClass> storage_class_usage_;
+    std::unordered_set<ast::AddressSpace> address_space_usage_;
     std::unordered_set<PipelineStageUsage> pipeline_stage_uses_;
     bool constructible_;
 };
diff --git a/src/tint/sem/type_test.cc b/src/tint/sem/type_test.cc
index 6ea97d3..02c76c2 100644
--- a/src/tint/sem/type_test.cc
+++ b/src/tint/sem/type_test.cc
@@ -43,7 +43,7 @@
     const sem::Matrix* mat4x3_f16 = create<Matrix>(vec3_f16, 4u);
     const sem::Matrix* mat4x3_af = create<Matrix>(vec3_af, 4u);
     const sem::Reference* ref_u32 =
-        create<Reference>(u32, ast::StorageClass::kPrivate, ast::Access::kReadWrite);
+        create<Reference>(u32, ast::AddressSpace::kPrivate, ast::Access::kReadWrite);
     const sem::Struct* str = create<Struct>(nullptr,
                                             Sym("s"),
                                             StructMemberList{
diff --git a/src/tint/sem/variable.cc b/src/tint/sem/variable.cc
index 6dcec63..9336947 100644
--- a/src/tint/sem/variable.cc
+++ b/src/tint/sem/variable.cc
@@ -31,13 +31,13 @@
 Variable::Variable(const ast::Variable* declaration,
                    const sem::Type* type,
                    EvaluationStage stage,
-                   ast::StorageClass storage_class,
+                   ast::AddressSpace address_space,
                    ast::Access access,
                    const Constant* constant_value)
     : declaration_(declaration),
       type_(type),
       stage_(stage),
-      storage_class_(storage_class),
+      address_space_(address_space),
       access_(access),
       constant_value_(constant_value) {}
 
@@ -46,11 +46,11 @@
 LocalVariable::LocalVariable(const ast::Variable* declaration,
                              const sem::Type* type,
                              EvaluationStage stage,
-                             ast::StorageClass storage_class,
+                             ast::AddressSpace address_space,
                              ast::Access access,
                              const sem::Statement* statement,
                              const Constant* constant_value)
-    : Base(declaration, type, stage, storage_class, access, constant_value),
+    : Base(declaration, type, stage, address_space, access, constant_value),
       statement_(statement) {}
 
 LocalVariable::~LocalVariable() = default;
@@ -58,12 +58,12 @@
 GlobalVariable::GlobalVariable(const ast::Variable* declaration,
                                const sem::Type* type,
                                EvaluationStage stage,
-                               ast::StorageClass storage_class,
+                               ast::AddressSpace address_space,
                                ast::Access access,
                                const Constant* constant_value,
                                sem::BindingPoint binding_point,
                                std::optional<uint32_t> location)
-    : Base(declaration, type, stage, storage_class, access, constant_value),
+    : Base(declaration, type, stage, address_space, access, constant_value),
       binding_point_(binding_point),
       location_(location) {}
 
@@ -72,12 +72,12 @@
 Parameter::Parameter(const ast::Parameter* declaration,
                      uint32_t index,
                      const sem::Type* type,
-                     ast::StorageClass storage_class,
+                     ast::AddressSpace address_space,
                      ast::Access access,
                      const ParameterUsage usage /* = ParameterUsage::kNone */,
                      sem::BindingPoint binding_point /* = {} */,
                      std::optional<uint32_t> location /* = std::nullopt */)
-    : Base(declaration, type, EvaluationStage::kRuntime, storage_class, access, nullptr),
+    : Base(declaration, type, EvaluationStage::kRuntime, address_space, access, nullptr),
       index_(index),
       usage_(usage),
       binding_point_(binding_point),
diff --git a/src/tint/sem/variable.h b/src/tint/sem/variable.h
index 5ea70b9..1d91e15 100644
--- a/src/tint/sem/variable.h
+++ b/src/tint/sem/variable.h
@@ -22,7 +22,7 @@
 #include "tint/override_id.h"
 
 #include "src/tint/ast/access.h"
-#include "src/tint/ast/storage_class.h"
+#include "src/tint/ast/address_space.h"
 #include "src/tint/sem/binding_point.h"
 #include "src/tint/sem/expression.h"
 #include "src/tint/sem/parameter_usage.h"
@@ -49,13 +49,13 @@
     /// @param declaration the AST declaration node
     /// @param type the variable type
     /// @param stage the evaluation stage for an expression of this variable type
-    /// @param storage_class the variable storage class
+    /// @param address_space the variable address space
     /// @param access the variable access control type
     /// @param constant_value the constant value for the variable. May be null
     Variable(const ast::Variable* declaration,
              const sem::Type* type,
              EvaluationStage stage,
-             ast::StorageClass storage_class,
+             ast::AddressSpace address_space,
              ast::Access access,
              const Constant* constant_value);
 
@@ -71,8 +71,8 @@
     /// @returns the evaluation stage for an expression of this variable type
     EvaluationStage Stage() const { return stage_; }
 
-    /// @returns the storage class for the variable
-    ast::StorageClass StorageClass() const { return storage_class_; }
+    /// @returns the address space for the variable
+    ast::AddressSpace AddressSpace() const { return address_space_; }
 
     /// @returns the access control for the variable
     ast::Access Access() const { return access_; }
@@ -98,7 +98,7 @@
     const ast::Variable* const declaration_;
     const sem::Type* const type_;
     const EvaluationStage stage_;
-    const ast::StorageClass storage_class_;
+    const ast::AddressSpace address_space_;
     const ast::Access access_;
     const Constant* constant_value_;
     const Expression* constructor_ = nullptr;
@@ -112,14 +112,14 @@
     /// @param declaration the AST declaration node
     /// @param type the variable type
     /// @param stage the evaluation stage for an expression of this variable type
-    /// @param storage_class the variable storage class
+    /// @param address_space the variable address space
     /// @param access the variable access control type
     /// @param statement the statement that declared this local variable
     /// @param constant_value the constant value for the variable. May be null
     LocalVariable(const ast::Variable* declaration,
                   const sem::Type* type,
                   EvaluationStage stage,
-                  ast::StorageClass storage_class,
+                  ast::AddressSpace address_space,
                   ast::Access access,
                   const sem::Statement* statement,
                   const Constant* constant_value);
@@ -149,7 +149,7 @@
     /// @param declaration the AST declaration node
     /// @param type the variable type
     /// @param stage the evaluation stage for an expression of this variable type
-    /// @param storage_class the variable storage class
+    /// @param address_space the variable address space
     /// @param access the variable access control type
     /// @param constant_value the constant value for the variable. May be null
     /// @param binding_point the optional resource binding point of the variable
@@ -160,7 +160,7 @@
     GlobalVariable(const ast::Variable* declaration,
                    const sem::Type* type,
                    EvaluationStage stage,
-                   ast::StorageClass storage_class,
+                   ast::AddressSpace address_space,
                    ast::Access access,
                    const Constant* constant_value,
                    sem::BindingPoint binding_point = {},
@@ -195,7 +195,7 @@
     /// @param declaration the AST declaration node
     /// @param index the index of the parmeter in the function
     /// @param type the variable type
-    /// @param storage_class the variable storage class
+    /// @param address_space the variable address space
     /// @param access the variable access control type
     /// @param usage the semantic usage for the parameter
     /// @param binding_point the optional resource binding point of the parameter
@@ -203,7 +203,7 @@
     Parameter(const ast::Parameter* declaration,
               uint32_t index,
               const sem::Type* type,
-              ast::StorageClass storage_class,
+              ast::AddressSpace address_space,
               ast::Access access,
               const ParameterUsage usage = ParameterUsage::kNone,
               sem::BindingPoint binding_point = {},