From 7a0b7348647bd9aa6b5e84edeebb8bb86a3204e8 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Wed, 22 Jul 2020 20:41:12 +0000 Subject: [PATCH] Fix BUILD.gn builds Change-Id: I4e54b30497e064061baff2dcc205b68db87bee2c Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25540 Reviewed-by: dan sinclair --- src/reader/spirv/function.cc | 2 +- src/reader/spirv/function_call_test.cc | 8 ++++---- tint_overrides_with_defaults.gni | 5 +++++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/reader/spirv/function.cc b/src/reader/spirv/function.cc index 3e547f9a2a..cfd830e69c 100644 --- a/src/reader/spirv/function.cc +++ b/src/reader/spirv/function.cc @@ -3397,7 +3397,7 @@ bool FunctionEmitter::EmitFunctionCall(const spvtools::opt::Instruction& inst) { } auto call_expr = std::make_unique(std::move(function), std::move(params)); - auto result_type = parser_impl_.ConvertType(inst.type_id()); + auto* result_type = parser_impl_.ConvertType(inst.type_id()); if (!result_type) { return Fail() << "internal error: no mapped type result of call: " << inst.PrettyPrint(); diff --git a/src/reader/spirv/function_call_test.cc b/src/reader/spirv/function_call_test.cc index c38f136825..c3581a5994 100644 --- a/src/reader/spirv/function_call_test.cc +++ b/src/reader/spirv/function_call_test.cc @@ -31,7 +31,7 @@ using ::testing::Eq; using ::testing::HasSubstr; TEST_F(SpvParserTest, EmitStatement_VoidCallNoParams) { - auto p = parser(test::Assemble(R"( + auto* p = parser(test::Assemble(R"( %void = OpTypeVoid %voidfn = OpTypeFunction %void @@ -69,7 +69,7 @@ TEST_F(SpvParserTest, EmitStatement_VoidCallNoParams) { } TEST_F(SpvParserTest, EmitStatement_ScalarCallNoParams) { - auto p = parser(test::Assemble(R"( + auto* p = parser(test::Assemble(R"( %void = OpTypeVoid %voidfn = OpTypeFunction %void %uint = OpTypeInt 32 0 @@ -121,7 +121,7 @@ Return{})")) } TEST_F(SpvParserTest, EmitStatement_ScalarCallNoParamsUsedTwice) { - auto p = parser(test::Assemble(R"( + auto* p = parser(test::Assemble(R"( %void = OpTypeVoid %voidfn = OpTypeFunction %void %uint = OpTypeInt 32 0 @@ -191,7 +191,7 @@ Return{})")) } TEST_F(SpvParserTest, EmitStatement_CallWithParams) { - auto p = parser(test::Assemble(R"( + auto* p = parser(test::Assemble(R"( %void = OpTypeVoid %voidfn = OpTypeFunction %void %uint = OpTypeInt 32 0 diff --git a/tint_overrides_with_defaults.gni b/tint_overrides_with_defaults.gni index eaad186e08..22e698b75a 100644 --- a/tint_overrides_with_defaults.gni +++ b/tint_overrides_with_defaults.gni @@ -61,4 +61,9 @@ declare_args() { if (!defined(tint_build_msl_writer)) { tint_build_msl_writer = false } + + # Build the HLSL output writer + if (!defined(tint_build_hlsl_writer)) { + tint_build_hlsl_writer = false + } }