tint: Rename Global() -> GlobalVar()

We have `GlobalLet()`, `Let()`, `Var()`, so this just
keeps things consistent

Change-Id: Ie9f79b62e737a15b995c5a2b19f84621a5ac3cc9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94604
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
diff --git a/src/tint/writer/glsl/generator_impl_array_accessor_test.cc b/src/tint/writer/glsl/generator_impl_array_accessor_test.cc
index d28e560..bbf90fe 100644
--- a/src/tint/writer/glsl/generator_impl_array_accessor_test.cc
+++ b/src/tint/writer/glsl/generator_impl_array_accessor_test.cc
@@ -22,7 +22,7 @@
 using GlslGeneratorImplTest_Expression = TestHelper;
 
 TEST_F(GlslGeneratorImplTest_Expression, IndexAccessor) {
-    Global("ary", ty.array<i32, 10>(), ast::StorageClass::kPrivate);
+    GlobalVar("ary", ty.array<i32, 10>(), ast::StorageClass::kPrivate);
     auto* expr = IndexAccessor("ary", 5_i);
     WrapInFunction(expr);
 
diff --git a/src/tint/writer/glsl/generator_impl_assign_test.cc b/src/tint/writer/glsl/generator_impl_assign_test.cc
index fbd9f62..84b6b30 100644
--- a/src/tint/writer/glsl/generator_impl_assign_test.cc
+++ b/src/tint/writer/glsl/generator_impl_assign_test.cc
@@ -20,8 +20,8 @@
 using GlslGeneratorImplTest_Assign = TestHelper;
 
 TEST_F(GlslGeneratorImplTest_Assign, Emit_Assign) {
-    Global("lhs", ty.i32(), ast::StorageClass::kPrivate);
-    Global("rhs", ty.i32(), ast::StorageClass::kPrivate);
+    GlobalVar("lhs", ty.i32(), ast::StorageClass::kPrivate);
+    GlobalVar("rhs", ty.i32(), ast::StorageClass::kPrivate);
     auto* assign = Assign("lhs", "rhs");
     WrapInFunction(assign);
 
diff --git a/src/tint/writer/glsl/generator_impl_binary_test.cc b/src/tint/writer/glsl/generator_impl_binary_test.cc
index 0d019a9..b529255 100644
--- a/src/tint/writer/glsl/generator_impl_binary_test.cc
+++ b/src/tint/writer/glsl/generator_impl_binary_test.cc
@@ -43,8 +43,8 @@
         return;
     }
 
-    Global("left", ty.f32(), ast::StorageClass::kPrivate);
-    Global("right", ty.f32(), ast::StorageClass::kPrivate);
+    GlobalVar("left", ty.f32(), ast::StorageClass::kPrivate);
+    GlobalVar("right", ty.f32(), ast::StorageClass::kPrivate);
 
     auto* left = Expr("left");
     auto* right = Expr("right");
@@ -62,8 +62,8 @@
 TEST_P(GlslBinaryTest, Emit_u32) {
     auto params = GetParam();
 
-    Global("left", ty.u32(), ast::StorageClass::kPrivate);
-    Global("right", ty.u32(), ast::StorageClass::kPrivate);
+    GlobalVar("left", ty.u32(), ast::StorageClass::kPrivate);
+    GlobalVar("right", ty.u32(), ast::StorageClass::kPrivate);
 
     auto* left = Expr("left");
     auto* right = Expr("right");
@@ -86,8 +86,8 @@
         return;
     }
 
-    Global("left", ty.i32(), ast::StorageClass::kPrivate);
-    Global("right", ty.i32(), ast::StorageClass::kPrivate);
+    GlobalVar("left", ty.i32(), ast::StorageClass::kPrivate);
+    GlobalVar("right", ty.i32(), ast::StorageClass::kPrivate);
 
     auto* left = Expr("left");
     auto* right = Expr("right");
@@ -153,7 +153,7 @@
 }
 
 TEST_F(GlslGeneratorImplTest_Binary, Multiply_MatrixScalar) {
-    Global("mat", ty.mat3x3<f32>(), ast::StorageClass::kPrivate);
+    GlobalVar("mat", ty.mat3x3<f32>(), ast::StorageClass::kPrivate);
     auto* lhs = Expr("mat");
     auto* rhs = Expr(1_f);
 
@@ -168,7 +168,7 @@
 }
 
 TEST_F(GlslGeneratorImplTest_Binary, Multiply_ScalarMatrix) {
-    Global("mat", ty.mat3x3<f32>(), ast::StorageClass::kPrivate);
+    GlobalVar("mat", ty.mat3x3<f32>(), ast::StorageClass::kPrivate);
     auto* lhs = Expr(1_f);
     auto* rhs = Expr("mat");
 
@@ -183,7 +183,7 @@
 }
 
 TEST_F(GlslGeneratorImplTest_Binary, Multiply_MatrixVector) {
-    Global("mat", ty.mat3x3<f32>(), ast::StorageClass::kPrivate);
+    GlobalVar("mat", ty.mat3x3<f32>(), ast::StorageClass::kPrivate);
     auto* lhs = Expr("mat");
     auto* rhs = vec3<f32>(1_f, 1_f, 1_f);
 
@@ -198,7 +198,7 @@
 }
 
 TEST_F(GlslGeneratorImplTest_Binary, Multiply_VectorMatrix) {
-    Global("mat", ty.mat3x3<f32>(), ast::StorageClass::kPrivate);
+    GlobalVar("mat", ty.mat3x3<f32>(), ast::StorageClass::kPrivate);
     auto* lhs = vec3<f32>(1_f, 1_f, 1_f);
     auto* rhs = Expr("mat");
 
@@ -213,8 +213,8 @@
 }
 
 TEST_F(GlslGeneratorImplTest_Binary, Multiply_MatrixMatrix) {
-    Global("lhs", ty.mat3x3<f32>(), ast::StorageClass::kPrivate);
-    Global("rhs", ty.mat3x3<f32>(), ast::StorageClass::kPrivate);
+    GlobalVar("lhs", ty.mat3x3<f32>(), ast::StorageClass::kPrivate);
+    GlobalVar("rhs", ty.mat3x3<f32>(), ast::StorageClass::kPrivate);
 
     auto* expr = create<ast::BinaryExpression>(ast::BinaryOp::kMultiply, Expr("lhs"), Expr("rhs"));
     WrapInFunction(expr);
@@ -227,8 +227,8 @@
 }
 
 TEST_F(GlslGeneratorImplTest_Binary, Logical_And) {
-    Global("a", ty.bool_(), ast::StorageClass::kPrivate);
-    Global("b", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("a", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("b", ty.bool_(), ast::StorageClass::kPrivate);
 
     auto* expr = create<ast::BinaryExpression>(ast::BinaryOp::kLogicalAnd, Expr("a"), Expr("b"));
     WrapInFunction(expr);
@@ -246,8 +246,8 @@
 }
 
 TEST_F(GlslGeneratorImplTest_Binary, ModF32) {
-    Global("a", ty.f32(), ast::StorageClass::kPrivate);
-    Global("b", ty.f32(), ast::StorageClass::kPrivate);
+    GlobalVar("a", ty.f32(), ast::StorageClass::kPrivate);
+    GlobalVar("b", ty.f32(), ast::StorageClass::kPrivate);
 
     auto* expr = create<ast::BinaryExpression>(ast::BinaryOp::kModulo, Expr("a"), Expr("b"));
     WrapInFunction(expr);
@@ -260,8 +260,8 @@
 }
 
 TEST_F(GlslGeneratorImplTest_Binary, ModVec3F32) {
-    Global("a", ty.vec3<f32>(), ast::StorageClass::kPrivate);
-    Global("b", ty.vec3<f32>(), ast::StorageClass::kPrivate);
+    GlobalVar("a", ty.vec3<f32>(), ast::StorageClass::kPrivate);
+    GlobalVar("b", ty.vec3<f32>(), ast::StorageClass::kPrivate);
 
     auto* expr = create<ast::BinaryExpression>(ast::BinaryOp::kModulo, Expr("a"), Expr("b"));
     WrapInFunction(expr);
@@ -275,10 +275,10 @@
 
 TEST_F(GlslGeneratorImplTest_Binary, Logical_Multi) {
     // (a && b) || (c || d)
-    Global("a", ty.bool_(), ast::StorageClass::kPrivate);
-    Global("b", ty.bool_(), ast::StorageClass::kPrivate);
-    Global("c", ty.bool_(), ast::StorageClass::kPrivate);
-    Global("d", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("a", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("b", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("c", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("d", ty.bool_(), ast::StorageClass::kPrivate);
 
     auto* expr = create<ast::BinaryExpression>(
         ast::BinaryOp::kLogicalOr,
@@ -307,8 +307,8 @@
 }
 
 TEST_F(GlslGeneratorImplTest_Binary, Logical_Or) {
-    Global("a", ty.bool_(), ast::StorageClass::kPrivate);
-    Global("b", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("a", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("b", ty.bool_(), ast::StorageClass::kPrivate);
 
     auto* expr = create<ast::BinaryExpression>(ast::BinaryOp::kLogicalOr, Expr("a"), Expr("b"));
     WrapInFunction(expr);
@@ -334,9 +334,9 @@
     //   return 3i;
     // }
 
-    Global("a", ty.bool_(), ast::StorageClass::kPrivate);
-    Global("b", ty.bool_(), ast::StorageClass::kPrivate);
-    Global("c", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("a", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("b", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("c", ty.bool_(), ast::StorageClass::kPrivate);
 
     auto* expr =
         If(create<ast::BinaryExpression>(ast::BinaryOp::kLogicalAnd, Expr("a"), Expr("b")),
@@ -371,9 +371,9 @@
 TEST_F(GlslGeneratorImplTest_Binary, Return_WithLogical) {
     // return (a && b) || c;
 
-    Global("a", ty.bool_(), ast::StorageClass::kPrivate);
-    Global("b", ty.bool_(), ast::StorageClass::kPrivate);
-    Global("c", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("a", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("b", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("c", ty.bool_(), ast::StorageClass::kPrivate);
 
     auto* expr = Return(create<ast::BinaryExpression>(
         ast::BinaryOp::kLogicalOr,
@@ -399,10 +399,10 @@
 TEST_F(GlslGeneratorImplTest_Binary, Assign_WithLogical) {
     // a = (b || c) && d;
 
-    Global("a", ty.bool_(), ast::StorageClass::kPrivate);
-    Global("b", ty.bool_(), ast::StorageClass::kPrivate);
-    Global("c", ty.bool_(), ast::StorageClass::kPrivate);
-    Global("d", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("a", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("b", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("c", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("d", ty.bool_(), ast::StorageClass::kPrivate);
 
     auto* expr =
         Assign(Expr("a"),
@@ -430,9 +430,9 @@
 TEST_F(GlslGeneratorImplTest_Binary, Decl_WithLogical) {
     // var a : bool = (b && c) || d;
 
-    Global("b", ty.bool_(), ast::StorageClass::kPrivate);
-    Global("c", ty.bool_(), ast::StorageClass::kPrivate);
-    Global("d", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("b", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("c", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("d", ty.bool_(), ast::StorageClass::kPrivate);
 
     auto* var =
         Var("a", ty.bool_(), ast::StorageClass::kNone,
@@ -469,10 +469,10 @@
              Param(Sym(), ty.bool_()),
          },
          ty.void_(), ast::StatementList{}, ast::AttributeList{});
-    Global("a", ty.bool_(), ast::StorageClass::kPrivate);
-    Global("b", ty.bool_(), ast::StorageClass::kPrivate);
-    Global("c", ty.bool_(), ast::StorageClass::kPrivate);
-    Global("d", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("a", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("b", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("c", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("d", ty.bool_(), ast::StorageClass::kPrivate);
 
     ast::ExpressionList params;
     params.push_back(
diff --git a/src/tint/writer/glsl/generator_impl_builtin_test.cc b/src/tint/writer/glsl/generator_impl_builtin_test.cc
index f7572b2..c753293 100644
--- a/src/tint/writer/glsl/generator_impl_builtin_test.cc
+++ b/src/tint/writer/glsl/generator_impl_builtin_test.cc
@@ -153,13 +153,13 @@
 TEST_P(GlslBuiltinTest, Emit) {
     auto param = GetParam();
 
-    Global("f2", ty.vec2<f32>(), ast::StorageClass::kPrivate);
-    Global("f3", ty.vec3<f32>(), ast::StorageClass::kPrivate);
-    Global("u2", ty.vec2<u32>(), ast::StorageClass::kPrivate);
-    Global("i2", ty.vec2<i32>(), ast::StorageClass::kPrivate);
-    Global("b2", ty.vec2<bool>(), ast::StorageClass::kPrivate);
-    Global("m2x2", ty.mat2x2<f32>(), ast::StorageClass::kPrivate);
-    Global("m3x2", ty.mat3x2<f32>(), ast::StorageClass::kPrivate);
+    GlobalVar("f2", ty.vec2<f32>(), ast::StorageClass::kPrivate);
+    GlobalVar("f3", ty.vec3<f32>(), ast::StorageClass::kPrivate);
+    GlobalVar("u2", ty.vec2<u32>(), ast::StorageClass::kPrivate);
+    GlobalVar("i2", ty.vec2<i32>(), ast::StorageClass::kPrivate);
+    GlobalVar("b2", ty.vec2<bool>(), ast::StorageClass::kPrivate);
+    GlobalVar("m2x2", ty.mat2x2<f32>(), ast::StorageClass::kPrivate);
+    GlobalVar("m3x2", ty.mat3x2<f32>(), ast::StorageClass::kPrivate);
 
     auto* call = GenerateCall(param.builtin, param.type, this);
     ASSERT_NE(nullptr, call) << "Unhandled builtin";
@@ -242,8 +242,8 @@
 TEST_F(GlslGeneratorImplTest_Builtin, Builtin_Call) {
     auto* call = Call("dot", "param1", "param2");
 
-    Global("param1", ty.vec3<f32>(), ast::StorageClass::kPrivate);
-    Global("param2", ty.vec3<f32>(), ast::StorageClass::kPrivate);
+    GlobalVar("param1", ty.vec3<f32>(), ast::StorageClass::kPrivate);
+    GlobalVar("param2", ty.vec3<f32>(), ast::StorageClass::kPrivate);
 
     WrapInFunction(CallStmt(call));
 
@@ -584,7 +584,7 @@
 
 TEST_F(GlslGeneratorImplTest_Builtin, Pack4x8Snorm) {
     auto* call = Call("pack4x8snorm", "p1");
-    Global("p1", ty.vec4<f32>(), ast::StorageClass::kPrivate);
+    GlobalVar("p1", ty.vec4<f32>(), ast::StorageClass::kPrivate);
     WrapInFunction(CallStmt(call));
     GeneratorImpl& gen = Build();
 
@@ -602,7 +602,7 @@
 
 TEST_F(GlslGeneratorImplTest_Builtin, Pack4x8Unorm) {
     auto* call = Call("pack4x8unorm", "p1");
-    Global("p1", ty.vec4<f32>(), ast::StorageClass::kPrivate);
+    GlobalVar("p1", ty.vec4<f32>(), ast::StorageClass::kPrivate);
     WrapInFunction(CallStmt(call));
     GeneratorImpl& gen = Build();
 
@@ -620,7 +620,7 @@
 
 TEST_F(GlslGeneratorImplTest_Builtin, Pack2x16Snorm) {
     auto* call = Call("pack2x16snorm", "p1");
-    Global("p1", ty.vec2<f32>(), ast::StorageClass::kPrivate);
+    GlobalVar("p1", ty.vec2<f32>(), ast::StorageClass::kPrivate);
     WrapInFunction(CallStmt(call));
     GeneratorImpl& gen = Build();
 
@@ -638,7 +638,7 @@
 
 TEST_F(GlslGeneratorImplTest_Builtin, Pack2x16Unorm) {
     auto* call = Call("pack2x16unorm", "p1");
-    Global("p1", ty.vec2<f32>(), ast::StorageClass::kPrivate);
+    GlobalVar("p1", ty.vec2<f32>(), ast::StorageClass::kPrivate);
     WrapInFunction(CallStmt(call));
     GeneratorImpl& gen = Build();
 
@@ -656,7 +656,7 @@
 
 TEST_F(GlslGeneratorImplTest_Builtin, Pack2x16Float) {
     auto* call = Call("pack2x16float", "p1");
-    Global("p1", ty.vec2<f32>(), ast::StorageClass::kPrivate);
+    GlobalVar("p1", ty.vec2<f32>(), ast::StorageClass::kPrivate);
     WrapInFunction(CallStmt(call));
     GeneratorImpl& gen = Build();
 
@@ -674,7 +674,7 @@
 
 TEST_F(GlslGeneratorImplTest_Builtin, Unpack4x8Snorm) {
     auto* call = Call("unpack4x8snorm", "p1");
-    Global("p1", ty.u32(), ast::StorageClass::kPrivate);
+    GlobalVar("p1", ty.u32(), ast::StorageClass::kPrivate);
     WrapInFunction(CallStmt(call));
     GeneratorImpl& gen = Build();
 
@@ -692,7 +692,7 @@
 
 TEST_F(GlslGeneratorImplTest_Builtin, Unpack4x8Unorm) {
     auto* call = Call("unpack4x8unorm", "p1");
-    Global("p1", ty.u32(), ast::StorageClass::kPrivate);
+    GlobalVar("p1", ty.u32(), ast::StorageClass::kPrivate);
     WrapInFunction(CallStmt(call));
     GeneratorImpl& gen = Build();
 
@@ -710,7 +710,7 @@
 
 TEST_F(GlslGeneratorImplTest_Builtin, Unpack2x16Snorm) {
     auto* call = Call("unpack2x16snorm", "p1");
-    Global("p1", ty.u32(), ast::StorageClass::kPrivate);
+    GlobalVar("p1", ty.u32(), ast::StorageClass::kPrivate);
     WrapInFunction(CallStmt(call));
     GeneratorImpl& gen = Build();
 
@@ -728,7 +728,7 @@
 
 TEST_F(GlslGeneratorImplTest_Builtin, Unpack2x16Unorm) {
     auto* call = Call("unpack2x16unorm", "p1");
-    Global("p1", ty.u32(), ast::StorageClass::kPrivate);
+    GlobalVar("p1", ty.u32(), ast::StorageClass::kPrivate);
     WrapInFunction(CallStmt(call));
     GeneratorImpl& gen = Build();
 
@@ -746,7 +746,7 @@
 
 TEST_F(GlslGeneratorImplTest_Builtin, Unpack2x16Float) {
     auto* call = Call("unpack2x16float", "p1");
-    Global("p1", ty.u32(), ast::StorageClass::kPrivate);
+    GlobalVar("p1", ty.u32(), ast::StorageClass::kPrivate);
     WrapInFunction(CallStmt(call));
     GeneratorImpl& gen = Build();
 
@@ -803,7 +803,7 @@
 }
 
 TEST_F(GlslGeneratorImplTest_Builtin, DotI32) {
-    Global("v", ty.vec3<i32>(), ast::StorageClass::kPrivate);
+    GlobalVar("v", ty.vec3<i32>(), ast::StorageClass::kPrivate);
     WrapInFunction(CallStmt(Call("dot", "v", "v")));
 
     GeneratorImpl& gen = SanitizeAndBuild();
@@ -831,9 +831,9 @@
 TEST_F(GlslGeneratorImplTest_Builtin, FMA) {
     auto* call = Call("fma", "a", "b", "c");
 
-    Global("a", ty.vec3<f32>(), ast::StorageClass::kPrivate);
-    Global("b", ty.vec3<f32>(), ast::StorageClass::kPrivate);
-    Global("c", ty.vec3<f32>(), ast::StorageClass::kPrivate);
+    GlobalVar("a", ty.vec3<f32>(), ast::StorageClass::kPrivate);
+    GlobalVar("b", ty.vec3<f32>(), ast::StorageClass::kPrivate);
+    GlobalVar("c", ty.vec3<f32>(), ast::StorageClass::kPrivate);
 
     WrapInFunction(CallStmt(call));
 
@@ -846,7 +846,7 @@
 }
 
 TEST_F(GlslGeneratorImplTest_Builtin, DotU32) {
-    Global("v", ty.vec3<u32>(), ast::StorageClass::kPrivate);
+    GlobalVar("v", ty.vec3<u32>(), ast::StorageClass::kPrivate);
     WrapInFunction(CallStmt(Call("dot", "v", "v")));
 
     GeneratorImpl& gen = SanitizeAndBuild();
diff --git a/src/tint/writer/glsl/generator_impl_call_test.cc b/src/tint/writer/glsl/generator_impl_call_test.cc
index c8a1de2..d1866ea 100644
--- a/src/tint/writer/glsl/generator_impl_call_test.cc
+++ b/src/tint/writer/glsl/generator_impl_call_test.cc
@@ -42,8 +42,8 @@
              Param(Sym(), ty.f32()),
          },
          ty.f32(), {Return(1.23_f)});
-    Global("param1", ty.f32(), ast::StorageClass::kPrivate);
-    Global("param2", ty.f32(), ast::StorageClass::kPrivate);
+    GlobalVar("param1", ty.f32(), ast::StorageClass::kPrivate);
+    GlobalVar("param2", ty.f32(), ast::StorageClass::kPrivate);
 
     auto* call = Call("my_func", "param1", "param2");
     WrapInFunction(call);
@@ -62,8 +62,8 @@
              Param(Sym(), ty.f32()),
          },
          ty.void_(), ast::StatementList{}, ast::AttributeList{});
-    Global("param1", ty.f32(), ast::StorageClass::kPrivate);
-    Global("param2", ty.f32(), ast::StorageClass::kPrivate);
+    GlobalVar("param1", ty.f32(), ast::StorageClass::kPrivate);
+    GlobalVar("param2", ty.f32(), ast::StorageClass::kPrivate);
 
     auto* call = CallStmt(Call("my_func", "param1", "param2"));
     WrapInFunction(call);
diff --git a/src/tint/writer/glsl/generator_impl_function_test.cc b/src/tint/writer/glsl/generator_impl_function_test.cc
index 4f1d027..e43ad53 100644
--- a/src/tint/writer/glsl/generator_impl_function_test.cc
+++ b/src/tint/writer/glsl/generator_impl_function_test.cc
@@ -349,11 +349,11 @@
 
 TEST_F(GlslGeneratorImplTest_Function, Emit_Attribute_EntryPoint_With_Uniform) {
     auto* ubo_ty = Structure("UBO", {Member("coord", ty.vec4<f32>())});
-    auto* ubo = Global("ubo", ty.Of(ubo_ty), ast::StorageClass::kUniform,
-                       ast::AttributeList{
-                           create<ast::BindingAttribute>(0),
-                           create<ast::GroupAttribute>(1),
-                       });
+    auto* ubo = GlobalVar("ubo", ty.Of(ubo_ty), ast::StorageClass::kUniform,
+                          ast::AttributeList{
+                              create<ast::BindingAttribute>(0),
+                              create<ast::GroupAttribute>(1),
+                          });
 
     Func("sub_func",
          {
@@ -403,11 +403,11 @@
 TEST_F(GlslGeneratorImplTest_Function, Emit_Attribute_EntryPoint_With_UniformStruct) {
     auto* s = Structure("Uniforms", {Member("coord", ty.vec4<f32>())});
 
-    Global("uniforms", ty.Of(s), ast::StorageClass::kUniform,
-           ast::AttributeList{
-               create<ast::BindingAttribute>(0),
-               create<ast::GroupAttribute>(1),
-           });
+    GlobalVar("uniforms", ty.Of(s), ast::StorageClass::kUniform,
+              ast::AttributeList{
+                  create<ast::BindingAttribute>(0),
+                  create<ast::GroupAttribute>(1),
+              });
 
     auto* var = Var("v", ty.f32(), ast::StorageClass::kNone,
                     MemberAccessor(MemberAccessor("uniforms", "coord"), "x"));
@@ -448,11 +448,11 @@
                                     Member("b", ty.f32()),
                                 });
 
-    Global("coord", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kReadWrite,
-           ast::AttributeList{
-               create<ast::BindingAttribute>(0),
-               create<ast::GroupAttribute>(1),
-           });
+    GlobalVar("coord", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kReadWrite,
+              ast::AttributeList{
+                  create<ast::BindingAttribute>(0),
+                  create<ast::GroupAttribute>(1),
+              });
 
     auto* var = Var("v", ty.f32(), ast::StorageClass::kNone, MemberAccessor("coord", "b"));
 
@@ -498,11 +498,11 @@
                                     Member("b", ty.f32()),
                                 });
 
-    Global("coord", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead,
-           ast::AttributeList{
-               create<ast::BindingAttribute>(0),
-               create<ast::GroupAttribute>(1),
-           });
+    GlobalVar("coord", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead,
+              ast::AttributeList{
+                  create<ast::BindingAttribute>(0),
+                  create<ast::GroupAttribute>(1),
+              });
 
     auto* var = Var("v", ty.f32(), ast::StorageClass::kNone, MemberAccessor("coord", "b"));
 
@@ -549,11 +549,11 @@
                                     Member("b", ty.f32()),
                                 });
 
-    Global("coord", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kWrite,
-           ast::AttributeList{
-               create<ast::BindingAttribute>(0),
-               create<ast::GroupAttribute>(1),
-           });
+    GlobalVar("coord", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kWrite,
+              ast::AttributeList{
+                  create<ast::BindingAttribute>(0),
+                  create<ast::GroupAttribute>(1),
+              });
 
     Func("frag_main", {}, ty.void_(),
          {
@@ -597,11 +597,11 @@
                                     Member("b", ty.f32()),
                                 });
 
-    Global("coord", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kReadWrite,
-           ast::AttributeList{
-               create<ast::BindingAttribute>(0),
-               create<ast::GroupAttribute>(1),
-           });
+    GlobalVar("coord", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kReadWrite,
+              ast::AttributeList{
+                  create<ast::BindingAttribute>(0),
+                  create<ast::GroupAttribute>(1),
+              });
 
     Func("frag_main", {}, ty.void_(),
          {
@@ -641,11 +641,11 @@
 
 TEST_F(GlslGeneratorImplTest_Function, Emit_Attribute_Called_By_EntryPoint_With_Uniform) {
     auto* s = Structure("S", {Member("x", ty.f32())});
-    Global("coord", ty.Of(s), ast::StorageClass::kUniform,
-           ast::AttributeList{
-               create<ast::BindingAttribute>(0),
-               create<ast::GroupAttribute>(1),
-           });
+    GlobalVar("coord", ty.Of(s), ast::StorageClass::kUniform,
+              ast::AttributeList{
+                  create<ast::BindingAttribute>(0),
+                  create<ast::GroupAttribute>(1),
+              });
 
     Func("sub_func", {Param("param", ty.f32())}, ty.f32(),
          {
@@ -690,11 +690,11 @@
 
 TEST_F(GlslGeneratorImplTest_Function, Emit_Attribute_Called_By_EntryPoint_With_StorageBuffer) {
     auto* s = Structure("S", {Member("x", ty.f32())});
-    Global("coord", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kReadWrite,
-           ast::AttributeList{
-               create<ast::BindingAttribute>(0),
-               create<ast::GroupAttribute>(1),
-           });
+    GlobalVar("coord", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kReadWrite,
+              ast::AttributeList{
+                  create<ast::BindingAttribute>(0),
+                  create<ast::GroupAttribute>(1),
+              });
 
     Func("sub_func", {Param("param", ty.f32())}, ty.f32(),
          {
@@ -922,11 +922,11 @@
 
     auto* s = Structure("Data", {Member("d", ty.f32())});
 
-    Global("data", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kReadWrite,
-           ast::AttributeList{
-               create<ast::BindingAttribute>(0),
-               create<ast::GroupAttribute>(0),
-           });
+    GlobalVar("data", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kReadWrite,
+              ast::AttributeList{
+                  create<ast::BindingAttribute>(0),
+                  create<ast::GroupAttribute>(0),
+              });
 
     {
         auto* var = Var("v", ty.f32(), ast::StorageClass::kNone, MemberAccessor("data", "d"));
diff --git a/src/tint/writer/glsl/generator_impl_identifier_test.cc b/src/tint/writer/glsl/generator_impl_identifier_test.cc
index 396c261..ff9bc88 100644
--- a/src/tint/writer/glsl/generator_impl_identifier_test.cc
+++ b/src/tint/writer/glsl/generator_impl_identifier_test.cc
@@ -20,7 +20,7 @@
 using GlslGeneratorImplTest_Identifier = TestHelper;
 
 TEST_F(GlslGeneratorImplTest_Identifier, EmitIdentifierExpression) {
-    Global("foo", ty.i32(), ast::StorageClass::kPrivate);
+    GlobalVar("foo", ty.i32(), ast::StorageClass::kPrivate);
 
     auto* i = Expr("foo");
     WrapInFunction(i);
diff --git a/src/tint/writer/glsl/generator_impl_if_test.cc b/src/tint/writer/glsl/generator_impl_if_test.cc
index 4b0b7bb..82dc307 100644
--- a/src/tint/writer/glsl/generator_impl_if_test.cc
+++ b/src/tint/writer/glsl/generator_impl_if_test.cc
@@ -20,7 +20,7 @@
 using GlslGeneratorImplTest_If = TestHelper;
 
 TEST_F(GlslGeneratorImplTest_If, Emit_If) {
-    Global("cond", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("cond", ty.bool_(), ast::StorageClass::kPrivate);
 
     auto* cond = Expr("cond");
     auto* body = Block(Return());
@@ -38,8 +38,8 @@
 }
 
 TEST_F(GlslGeneratorImplTest_If, Emit_IfWithElseIf) {
-    Global("cond", ty.bool_(), ast::StorageClass::kPrivate);
-    Global("else_cond", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("cond", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("else_cond", ty.bool_(), ast::StorageClass::kPrivate);
 
     auto* else_cond = Expr("else_cond");
     auto* else_body = Block(Return());
@@ -65,7 +65,7 @@
 }
 
 TEST_F(GlslGeneratorImplTest_If, Emit_IfWithElse) {
-    Global("cond", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("cond", ty.bool_(), ast::StorageClass::kPrivate);
 
     auto* else_body = Block(Return());
 
@@ -88,8 +88,8 @@
 }
 
 TEST_F(GlslGeneratorImplTest_If, Emit_IfWithMultiple) {
-    Global("cond", ty.bool_(), ast::StorageClass::kPrivate);
-    Global("else_cond", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("cond", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("else_cond", ty.bool_(), ast::StorageClass::kPrivate);
 
     auto* else_cond = Expr("else_cond");
 
diff --git a/src/tint/writer/glsl/generator_impl_import_test.cc b/src/tint/writer/glsl/generator_impl_import_test.cc
index 2843f98..9e988f1 100644
--- a/src/tint/writer/glsl/generator_impl_import_test.cc
+++ b/src/tint/writer/glsl/generator_impl_import_test.cc
@@ -256,7 +256,7 @@
                          testing::Values(GlslImportData{"clamp", "clamp"}));
 
 TEST_F(GlslGeneratorImplTest_Import, GlslImportData_Determinant) {
-    Global("var", ty.mat3x3<f32>(), ast::StorageClass::kPrivate);
+    GlobalVar("var", ty.mat3x3<f32>(), ast::StorageClass::kPrivate);
 
     auto* expr = Call("determinant", "var");
     WrapInFunction(expr);
diff --git a/src/tint/writer/glsl/generator_impl_loop_test.cc b/src/tint/writer/glsl/generator_impl_loop_test.cc
index ec9219a..9da50f0 100644
--- a/src/tint/writer/glsl/generator_impl_loop_test.cc
+++ b/src/tint/writer/glsl/generator_impl_loop_test.cc
@@ -66,8 +66,8 @@
 TEST_F(GlslGeneratorImplTest_Loop, Emit_LoopNestedWithContinuing) {
     Func("a_statement", {}, ty.void_(), {});
 
-    Global("lhs", ty.f32(), ast::StorageClass::kPrivate);
-    Global("rhs", ty.f32(), ast::StorageClass::kPrivate);
+    GlobalVar("lhs", ty.f32(), ast::StorageClass::kPrivate);
+    GlobalVar("rhs", ty.f32(), ast::StorageClass::kPrivate);
 
     auto* body = Block(create<ast::DiscardStatement>());
     auto* continuing = Block(CallStmt(Call("a_statement")));
@@ -112,7 +112,7 @@
     //   }
     // }
 
-    Global("rhs", ty.f32(), ast::StorageClass::kPrivate);
+    GlobalVar("rhs", ty.f32(), ast::StorageClass::kPrivate);
 
     auto* body = Block(Decl(Var("lhs", ty.f32(), Expr(2.4_f))),  //
                        Decl(Var("other", ty.f32())),             //
diff --git a/src/tint/writer/glsl/generator_impl_member_accessor_test.cc b/src/tint/writer/glsl/generator_impl_member_accessor_test.cc
index fcfa9df..11e0e38 100644
--- a/src/tint/writer/glsl/generator_impl_member_accessor_test.cc
+++ b/src/tint/writer/glsl/generator_impl_member_accessor_test.cc
@@ -91,11 +91,11 @@
 
         auto* s = b.Structure("Data", members);
 
-        b.Global("data", b.ty.Of(s), ast::StorageClass::kStorage, ast::Access::kReadWrite,
-                 ast::AttributeList{
-                     b.create<ast::BindingAttribute>(0),
-                     b.create<ast::GroupAttribute>(1),
-                 });
+        b.GlobalVar("data", b.ty.Of(s), ast::StorageClass::kStorage, ast::Access::kReadWrite,
+                    ast::AttributeList{
+                        b.create<ast::BindingAttribute>(0),
+                        b.create<ast::GroupAttribute>(1),
+                    });
     }
 
     void SetupFunction(ast::StatementList statements) {
@@ -115,7 +115,7 @@
 
 TEST_F(GlslGeneratorImplTest_MemberAccessor, EmitExpression_MemberAccessor) {
     auto* s = Structure("Data", {Member("mem", ty.f32())});
-    Global("str", ty.Of(s), ast::StorageClass::kPrivate);
+    GlobalVar("str", ty.Of(s), ast::StorageClass::kPrivate);
 
     auto* expr = MemberAccessor("str", "mem");
     WrapInFunction(Var("expr", ty.f32(), ast::StorageClass::kNone, expr));
diff --git a/src/tint/writer/glsl/generator_impl_sanitizer_test.cc b/src/tint/writer/glsl/generator_impl_sanitizer_test.cc
index 0187da0..13f2762 100644
--- a/src/tint/writer/glsl/generator_impl_sanitizer_test.cc
+++ b/src/tint/writer/glsl/generator_impl_sanitizer_test.cc
@@ -26,11 +26,11 @@
 
 TEST_F(GlslSanitizerTest, Call_ArrayLength) {
     auto* s = Structure("my_struct", {Member(0, "a", ty.array<f32>(4))});
-    Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead,
-           ast::AttributeList{
-               create<ast::BindingAttribute>(1),
-               create<ast::GroupAttribute>(2),
-           });
+    GlobalVar("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead,
+              ast::AttributeList{
+                  create<ast::BindingAttribute>(1),
+                  create<ast::GroupAttribute>(2),
+              });
 
     Func("a_func", {}, ty.void_(),
          {
@@ -69,11 +69,11 @@
                                          Member(0, "z", ty.f32()),
                                          Member(4, "a", ty.array<f32>(4)),
                                      });
-    Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead,
-           ast::AttributeList{
-               create<ast::BindingAttribute>(1),
-               create<ast::GroupAttribute>(2),
-           });
+    GlobalVar("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead,
+              ast::AttributeList{
+                  create<ast::BindingAttribute>(1),
+                  create<ast::GroupAttribute>(2),
+              });
 
     Func("a_func", {}, ty.void_(),
          {
@@ -111,11 +111,11 @@
 
 TEST_F(GlslSanitizerTest, Call_ArrayLength_ViaLets) {
     auto* s = Structure("my_struct", {Member(0, "a", ty.array<f32>(4))});
-    Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead,
-           ast::AttributeList{
-               create<ast::BindingAttribute>(1),
-               create<ast::GroupAttribute>(2),
-           });
+    GlobalVar("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead,
+              ast::AttributeList{
+                  create<ast::BindingAttribute>(1),
+                  create<ast::GroupAttribute>(2),
+              });
 
     auto* p = Let("p", nullptr, AddressOf("b"));
     auto* p2 = Let("p2", nullptr, AddressOf(MemberAccessor(Deref(p), "a")));
diff --git a/src/tint/writer/glsl/generator_impl_storage_buffer_test.cc b/src/tint/writer/glsl/generator_impl_storage_buffer_test.cc
index a12fbbc..e2a6f97 100644
--- a/src/tint/writer/glsl/generator_impl_storage_buffer_test.cc
+++ b/src/tint/writer/glsl/generator_impl_storage_buffer_test.cc
@@ -35,11 +35,11 @@
                                       ctx->Member("dewey", ctx->ty.f32(), {ctx->MemberAlign(256)}),
                                       ctx->Member("louie", ctx->ty.f32(), {ctx->MemberAlign(256)}),
                                   });
-    ctx->Global("nephews", ctx->ty.Of(nephews), ast::StorageClass::kStorage,
-                ast::AttributeList{
-                    ctx->create<ast::BindingAttribute>(0),
-                    ctx->create<ast::GroupAttribute>(0),
-                });
+    ctx->GlobalVar("nephews", ctx->ty.Of(nephews), ast::StorageClass::kStorage,
+                   ast::AttributeList{
+                       ctx->create<ast::BindingAttribute>(0),
+                       ctx->create<ast::GroupAttribute>(0),
+                   });
 }
 
 TEST_F(GlslGeneratorImplTest_StorageBuffer, Align) {
diff --git a/src/tint/writer/glsl/generator_impl_switch_test.cc b/src/tint/writer/glsl/generator_impl_switch_test.cc
index 1cc42fb..c8957be 100644
--- a/src/tint/writer/glsl/generator_impl_switch_test.cc
+++ b/src/tint/writer/glsl/generator_impl_switch_test.cc
@@ -22,7 +22,7 @@
 using GlslGeneratorImplTest_Switch = TestHelper;
 
 TEST_F(GlslGeneratorImplTest_Switch, Emit_Switch) {
-    Global("cond", ty.i32(), ast::StorageClass::kPrivate);
+    GlobalVar("cond", ty.i32(), ast::StorageClass::kPrivate);
 
     auto* def_body = Block(create<ast::BreakStatement>());
     auto* def = create<ast::CaseStatement>(ast::CaseSelectorList{}, def_body);
diff --git a/src/tint/writer/glsl/generator_impl_test.cc b/src/tint/writer/glsl/generator_impl_test.cc
index 70e5c0b..3dbf601 100644
--- a/src/tint/writer/glsl/generator_impl_test.cc
+++ b/src/tint/writer/glsl/generator_impl_test.cc
@@ -57,12 +57,12 @@
 }
 
 TEST_F(GlslGeneratorImplTest, GenerateSampleIndexES) {
-    Global("gl_SampleID", ty.i32(),
-           ast::AttributeList{
-               Builtin(ast::Builtin::kSampleIndex),
-               Disable(ast::DisabledValidation::kIgnoreStorageClass),
-           },
-           ast::StorageClass::kInput);
+    GlobalVar("gl_SampleID", ty.i32(),
+              ast::AttributeList{
+                  Builtin(ast::Builtin::kSampleIndex),
+                  Disable(ast::DisabledValidation::kIgnoreStorageClass),
+              },
+              ast::StorageClass::kInput);
     Func("my_func", {}, ty.i32(),
          {
              Return(Expr("gl_SampleID")),
@@ -82,12 +82,12 @@
 }
 
 TEST_F(GlslGeneratorImplTest, GenerateSampleIndexDesktop) {
-    Global("gl_SampleID", ty.i32(),
-           ast::AttributeList{
-               Builtin(ast::Builtin::kSampleIndex),
-               Disable(ast::DisabledValidation::kIgnoreStorageClass),
-           },
-           ast::StorageClass::kInput);
+    GlobalVar("gl_SampleID", ty.i32(),
+              ast::AttributeList{
+                  Builtin(ast::Builtin::kSampleIndex),
+                  Disable(ast::DisabledValidation::kIgnoreStorageClass),
+              },
+              ast::StorageClass::kInput);
     Func("my_func", {}, ty.i32(),
          {
              Return(Expr("gl_SampleID")),
diff --git a/src/tint/writer/glsl/generator_impl_type_test.cc b/src/tint/writer/glsl/generator_impl_type_test.cc
index b7daee2..4242368 100644
--- a/src/tint/writer/glsl/generator_impl_type_test.cc
+++ b/src/tint/writer/glsl/generator_impl_type_test.cc
@@ -33,7 +33,7 @@
 
 TEST_F(GlslGeneratorImplTest_Type, EmitType_Array) {
     auto* arr = ty.array<bool, 4>();
-    Global("G", arr, ast::StorageClass::kPrivate);
+    GlobalVar("G", arr, ast::StorageClass::kPrivate);
 
     GeneratorImpl& gen = Build();
 
@@ -46,7 +46,7 @@
 
 TEST_F(GlslGeneratorImplTest_Type, EmitType_ArrayOfArray) {
     auto* arr = ty.array(ty.array<bool, 4>(), 5_u);
-    Global("G", arr, ast::StorageClass::kPrivate);
+    GlobalVar("G", arr, ast::StorageClass::kPrivate);
 
     GeneratorImpl& gen = Build();
 
@@ -59,7 +59,7 @@
 
 TEST_F(GlslGeneratorImplTest_Type, EmitType_ArrayOfArrayOfArray) {
     auto* arr = ty.array(ty.array(ty.array<bool, 4>(), 5_u), 6_u);
-    Global("G", arr, ast::StorageClass::kPrivate);
+    GlobalVar("G", arr, ast::StorageClass::kPrivate);
 
     GeneratorImpl& gen = Build();
 
@@ -72,7 +72,7 @@
 
 TEST_F(GlslGeneratorImplTest_Type, EmitType_Array_WithoutName) {
     auto* arr = ty.array<bool, 4>();
-    Global("G", arr, ast::StorageClass::kPrivate);
+    GlobalVar("G", arr, ast::StorageClass::kPrivate);
 
     GeneratorImpl& gen = Build();
 
@@ -134,7 +134,7 @@
                                  Member("a", ty.i32()),
                                  Member("b", ty.f32()),
                              });
-    Global("g", ty.Of(s), ast::StorageClass::kPrivate);
+    GlobalVar("g", ty.Of(s), ast::StorageClass::kPrivate);
 
     GeneratorImpl& gen = Build();
 
@@ -154,7 +154,7 @@
                                  Member("a", ty.i32()),
                                  Member("b", ty.f32()),
                              });
-    Global("g", ty.Of(s), ast::StorageClass::kPrivate);
+    GlobalVar("g", ty.Of(s), ast::StorageClass::kPrivate);
 
     GeneratorImpl& gen = Build();
 
@@ -170,7 +170,7 @@
                                  Member("double", ty.i32()),
                                  Member("float", ty.f32()),
                              });
-    Global("g", ty.Of(s), ast::StorageClass::kPrivate);
+    GlobalVar("g", ty.Of(s), ast::StorageClass::kPrivate);
 
     GeneratorImpl& gen = SanitizeAndBuild();
 
@@ -187,7 +187,7 @@
                                  Member("a", ty.i32(), {MemberOffset(0)}),
                                  Member("b", ty.f32(), {MemberOffset(8)}),
                              });
-    Global("g", ty.Of(s), ast::StorageClass::kPrivate);
+    GlobalVar("g", ty.Of(s), ast::StorageClass::kPrivate);
 
     GeneratorImpl& gen = Build();
 
@@ -270,11 +270,11 @@
 
     auto* t = ty.depth_texture(params.dim);
 
-    Global("tex", t,
-           ast::AttributeList{
-               create<ast::BindingAttribute>(1),
-               create<ast::GroupAttribute>(2),
-           });
+    GlobalVar("tex", t,
+              ast::AttributeList{
+                  create<ast::BindingAttribute>(1),
+                  create<ast::GroupAttribute>(2),
+              });
 
     Func("main", {}, ty.void_(), {CallStmt(Call("textureDimensions", "tex"))},
          {Stage(ast::PipelineStage::kFragment)});
@@ -297,11 +297,11 @@
 TEST_F(GlslDepthMultisampledTexturesTest, Emit) {
     auto* t = ty.depth_multisampled_texture(ast::TextureDimension::k2d);
 
-    Global("tex", t,
-           ast::AttributeList{
-               create<ast::BindingAttribute>(1),
-               create<ast::GroupAttribute>(2),
-           });
+    GlobalVar("tex", t,
+              ast::AttributeList{
+                  create<ast::BindingAttribute>(1),
+                  create<ast::GroupAttribute>(2),
+              });
 
     Func("main", {}, ty.void_(), {CallStmt(Call("textureDimensions", "tex"))},
          {Stage(ast::PipelineStage::kFragment)});
@@ -340,11 +340,11 @@
     }
     auto* t = ty.sampled_texture(params.dim, datatype);
 
-    Global("tex", t,
-           ast::AttributeList{
-               create<ast::BindingAttribute>(1),
-               create<ast::GroupAttribute>(2),
-           });
+    GlobalVar("tex", t,
+              ast::AttributeList{
+                  create<ast::BindingAttribute>(1),
+                  create<ast::GroupAttribute>(2),
+              });
 
     Func("main", {}, ty.void_(), {CallStmt(Call("textureDimensions", "tex"))},
          {Stage(ast::PipelineStage::kFragment)});
@@ -474,11 +474,11 @@
 
     auto* t = ty.storage_texture(params.dim, params.imgfmt, ast::Access::kWrite);
 
-    Global("tex", t,
-           ast::AttributeList{
-               create<ast::BindingAttribute>(1),
-               create<ast::GroupAttribute>(2),
-           });
+    GlobalVar("tex", t,
+              ast::AttributeList{
+                  create<ast::BindingAttribute>(1),
+                  create<ast::GroupAttribute>(2),
+              });
 
     Func("main", {}, ty.void_(), {CallStmt(Call("textureDimensions", "tex"))},
          {Stage(ast::PipelineStage::kFragment)});
diff --git a/src/tint/writer/glsl/generator_impl_unary_op_test.cc b/src/tint/writer/glsl/generator_impl_unary_op_test.cc
index 0e318fc..22012c8 100644
--- a/src/tint/writer/glsl/generator_impl_unary_op_test.cc
+++ b/src/tint/writer/glsl/generator_impl_unary_op_test.cc
@@ -20,7 +20,7 @@
 using GlslUnaryOpTest = TestHelper;
 
 TEST_F(GlslUnaryOpTest, AddressOf) {
-    Global("expr", ty.f32(), ast::StorageClass::kPrivate);
+    GlobalVar("expr", ty.f32(), ast::StorageClass::kPrivate);
     auto* op = create<ast::UnaryOpExpression>(ast::UnaryOp::kAddressOf, Expr("expr"));
     WrapInFunction(op);
 
@@ -32,7 +32,7 @@
 }
 
 TEST_F(GlslUnaryOpTest, Complement) {
-    Global("expr", ty.u32(), ast::StorageClass::kPrivate);
+    GlobalVar("expr", ty.u32(), ast::StorageClass::kPrivate);
     auto* op = create<ast::UnaryOpExpression>(ast::UnaryOp::kComplement, Expr("expr"));
     WrapInFunction(op);
 
@@ -44,7 +44,7 @@
 }
 
 TEST_F(GlslUnaryOpTest, Indirection) {
-    Global("G", ty.f32(), ast::StorageClass::kPrivate);
+    GlobalVar("G", ty.f32(), ast::StorageClass::kPrivate);
     auto* p =
         Let("expr", nullptr, create<ast::UnaryOpExpression>(ast::UnaryOp::kAddressOf, Expr("G")));
     auto* op = create<ast::UnaryOpExpression>(ast::UnaryOp::kIndirection, Expr("expr"));
@@ -58,7 +58,7 @@
 }
 
 TEST_F(GlslUnaryOpTest, Not) {
-    Global("expr", ty.bool_(), ast::StorageClass::kPrivate);
+    GlobalVar("expr", ty.bool_(), ast::StorageClass::kPrivate);
     auto* op = create<ast::UnaryOpExpression>(ast::UnaryOp::kNot, Expr("expr"));
     WrapInFunction(op);
 
@@ -70,7 +70,7 @@
 }
 
 TEST_F(GlslUnaryOpTest, Negation) {
-    Global("expr", ty.i32(), ast::StorageClass::kPrivate);
+    GlobalVar("expr", ty.i32(), ast::StorageClass::kPrivate);
     auto* op = create<ast::UnaryOpExpression>(ast::UnaryOp::kNegation, Expr("expr"));
     WrapInFunction(op);
 
diff --git a/src/tint/writer/glsl/generator_impl_uniform_buffer_test.cc b/src/tint/writer/glsl/generator_impl_uniform_buffer_test.cc
index 8709b3d..8e653b5 100644
--- a/src/tint/writer/glsl/generator_impl_uniform_buffer_test.cc
+++ b/src/tint/writer/glsl/generator_impl_uniform_buffer_test.cc
@@ -24,7 +24,7 @@
 
 TEST_F(GlslGeneratorImplTest_UniformBuffer, Simple) {
     auto* simple = Structure("Simple", {Member("member", ty.f32())});
-    Global("simple", ty.Of(simple), ast::StorageClass::kUniform, GroupAndBinding(0, 0));
+    GlobalVar("simple", ty.Of(simple), ast::StorageClass::kUniform, GroupAndBinding(0, 0));
 
     GeneratorImpl& gen = Build();
 
@@ -44,7 +44,7 @@
 
 TEST_F(GlslGeneratorImplTest_UniformBuffer, Simple_Desktop) {
     auto* simple = Structure("Simple", {Member("member", ty.f32())});
-    Global("simple", ty.Of(simple), ast::StorageClass::kUniform, GroupAndBinding(0, 0));
+    GlobalVar("simple", ty.Of(simple), ast::StorageClass::kUniform, GroupAndBinding(0, 0));
 
     GeneratorImpl& gen = Build(Version(Version::Standard::kDesktop, 4, 4));
 
diff --git a/src/tint/writer/glsl/generator_impl_variable_decl_statement_test.cc b/src/tint/writer/glsl/generator_impl_variable_decl_statement_test.cc
index 5d95bc6..f8983cb 100644
--- a/src/tint/writer/glsl/generator_impl_variable_decl_statement_test.cc
+++ b/src/tint/writer/glsl/generator_impl_variable_decl_statement_test.cc
@@ -64,7 +64,7 @@
 }
 
 TEST_F(GlslGeneratorImplTest_VariableDecl, Emit_VariableDeclStatement_Private) {
-    Global("a", ty.f32(), ast::StorageClass::kPrivate);
+    GlobalVar("a", ty.f32(), ast::StorageClass::kPrivate);
 
     WrapInFunction(Expr("a"));
 
@@ -77,8 +77,8 @@
 }
 
 TEST_F(GlslGeneratorImplTest_VariableDecl, Emit_VariableDeclStatement_Initializer_Private) {
-    Global("initializer", ty.f32(), ast::StorageClass::kPrivate);
-    Global("a", ty.f32(), ast::StorageClass::kPrivate, Expr("initializer"));
+    GlobalVar("initializer", ty.f32(), ast::StorageClass::kPrivate);
+    GlobalVar("a", ty.f32(), ast::StorageClass::kPrivate, Expr("initializer"));
 
     WrapInFunction(Expr("a"));
 
diff --git a/src/tint/writer/glsl/generator_impl_workgroup_var_test.cc b/src/tint/writer/glsl/generator_impl_workgroup_var_test.cc
index faa675d..1d96441 100644
--- a/src/tint/writer/glsl/generator_impl_workgroup_var_test.cc
+++ b/src/tint/writer/glsl/generator_impl_workgroup_var_test.cc
@@ -27,7 +27,7 @@
 using GlslGeneratorImplTest_WorkgroupVar = TestHelper;
 
 TEST_F(GlslGeneratorImplTest_WorkgroupVar, Basic) {
-    Global("wg", ty.f32(), ast::StorageClass::kWorkgroup);
+    GlobalVar("wg", ty.f32(), ast::StorageClass::kWorkgroup);
 
     Func("main", {}, ty.void_(), {Assign("wg", 1.2_f)},
          {
@@ -43,7 +43,7 @@
 TEST_F(GlslGeneratorImplTest_WorkgroupVar, Aliased) {
     auto* alias = Alias("F32", ty.f32());
 
-    Global("wg", ty.Of(alias), ast::StorageClass::kWorkgroup);
+    GlobalVar("wg", ty.Of(alias), ast::StorageClass::kWorkgroup);
 
     Func("main", {}, ty.void_(), {Assign("wg", 1.2_f)},
          {