diff --git a/src/reader/spirv/function.cc b/src/reader/spirv/function.cc index 94520c48b7..97626f884a 100644 --- a/src/reader/spirv/function.cc +++ b/src/reader/spirv/function.cc @@ -92,7 +92,7 @@ bool FunctionEmitter::EmitFunctionDeclaration() { << function_.result_id(); } - std::vector> ast_params; + ast::VariableList ast_params; function_.ForEachParam( [this, &ast_params](const spvtools::opt::Instruction* param) { auto* ast_type = parser_impl_.ConvertType(param->type_id()); diff --git a/src/reader/spirv/function.h b/src/reader/spirv/function.h index 9e6a809e37..2b7e58de3a 100644 --- a/src/reader/spirv/function.h +++ b/src/reader/spirv/function.h @@ -53,9 +53,7 @@ class FunctionEmitter { bool failed() const { return !success(); } /// @returns the body of the function. - const std::vector>& ast_body() { - return ast_body_; - } + const ast::StatementList& ast_body() { return ast_body_; } /// Records failure. /// @returns a FailStream on which to emit diagnostics. @@ -91,7 +89,7 @@ class FunctionEmitter { FailStream& fail_stream_; Namer& namer_; const spvtools::opt::Function& function_; - std::vector> ast_body_; + ast::StatementList ast_body_; }; } // namespace spirv diff --git a/src/reader/spirv/parser_impl_test_helper.h b/src/reader/spirv/parser_impl_test_helper.h index 7c5f15f60c..e6cb026baa 100644 --- a/src/reader/spirv/parser_impl_test_helper.h +++ b/src/reader/spirv/parser_impl_test_helper.h @@ -66,8 +66,7 @@ class SpvParserTest : public testing::Test { /// Returns the string dump of a function body. /// @param body the statement in the body /// @returnss the string dump of a function body. -inline std::string ToString( - const std::vector>& body) { +inline std::string ToString(const ast::StatementList& body) { std::ostringstream outs; for (const auto& stmt : body) { stmt->to_str(outs, 0);