summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordan sinclair <dj2@everburning.com>2018-08-03 15:06:09 -0400
committerGitHub <noreply@github.com>2018-08-03 15:06:09 -0400
commiteda2cfbe128e5b71e9a0131f816ade5186ad6420 (patch)
tree3342879b183f8cb6af3659033bd54fc2f3d7b921
parent2d9a325264e3fc81317acc0a68a098f0546c352d (diff)
Cleanup includes. (#1795)
This Cl cleans up the include paths to be relative to the top level directory. Various include-what-you-use fixes have been added.
-rw-r--r--Android.mk1
-rw-r--r--BUILD.gn1
-rw-r--r--CMakeLists.txt1
-rw-r--r--PRESUBMIT.py3
-rw-r--r--source/assembly_grammar.cpp10
-rw-r--r--source/assembly_grammar.h8
-rw-r--r--source/binary.cpp19
-rw-r--r--source/binary.h2
-rw-r--r--source/comp/markv.h2
-rw-r--r--source/comp/markv_codec.cpp48
-rw-r--r--source/comp/markv_model.h7
-rw-r--r--source/diagnostic.cpp5
-rw-r--r--source/disassemble.cpp27
-rw-r--r--source/enum_set.h2
-rw-r--r--source/enum_string_mapping.cpp4
-rw-r--r--source/enum_string_mapping.h4
-rw-r--r--source/ext_inst.cpp16
-rw-r--r--source/ext_inst.h2
-rw-r--r--source/extensions.cpp4
-rw-r--r--source/extensions.h2
-rw-r--r--source/id_descriptor.cpp6
-rw-r--r--source/instruction.h2
-rw-r--r--source/libspirv.cpp6
-rw-r--r--source/link/linker.cpp26
-rw-r--r--source/message.cpp2
-rw-r--r--source/name_mapper.cpp6
-rw-r--r--source/name_mapper.h2
-rw-r--r--source/opcode.cpp14
-rw-r--r--source/opcode.h6
-rw-r--r--source/operand.cpp8
-rw-r--r--source/operand.h3
-rw-r--r--source/opt/aggressive_dead_code_elim_pass.cpp13
-rw-r--r--source/opt/aggressive_dead_code_elim_pass.h13
-rw-r--r--source/opt/basic_block.cpp14
-rw-r--r--source/opt/basic_block.h7
-rw-r--r--source/opt/block_merge_pass.cpp8
-rw-r--r--source/opt/block_merge_pass.h10
-rw-r--r--source/opt/build_module.cpp13
-rw-r--r--source/opt/build_module.h4
-rw-r--r--source/opt/ccp_pass.cpp13
-rw-r--r--source/opt/ccp_pass.h15
-rw-r--r--source/opt/cfg.cpp14
-rw-r--r--source/opt/cfg.h5
-rw-r--r--source/opt/cfg_cleanup_pass.cpp6
-rw-r--r--source/opt/cfg_cleanup_pass.h6
-rw-r--r--source/opt/combine_access_chains.cpp10
-rw-r--r--source/opt/combine_access_chains.h4
-rw-r--r--source/opt/common_uniform_elim_pass.cpp6
-rw-r--r--source/opt/common_uniform_elim_pass.h18
-rw-r--r--source/opt/compact_ids_pass.cpp5
-rw-r--r--source/opt/compact_ids_pass.h6
-rw-r--r--source/opt/composite.cpp10
-rw-r--r--source/opt/composite.h9
-rw-r--r--source/opt/const_folding_rules.cpp4
-rw-r--r--source/opt/const_folding_rules.h3
-rw-r--r--source/opt/constants.cpp5
-rw-r--r--source/opt/constants.h11
-rw-r--r--source/opt/copy_prop_arrays.cpp7
-rw-r--r--source/opt/copy_prop_arrays.h5
-rw-r--r--source/opt/dead_branch_elim_pass.cpp14
-rw-r--r--source/opt/dead_branch_elim_pass.h9
-rw-r--r--source/opt/dead_insert_elim_pass.cpp10
-rw-r--r--source/opt/dead_insert_elim_pass.h11
-rw-r--r--source/opt/dead_variable_elimination.cpp8
-rw-r--r--source/opt/dead_variable_elimination.h4
-rw-r--r--source/opt/decoration_manager.cpp6
-rw-r--r--source/opt/decoration_manager.h4
-rw-r--r--source/opt/def_use_manager.cpp6
-rw-r--r--source/opt/def_use_manager.h5
-rw-r--r--source/opt/dominator_analysis.cpp4
-rw-r--r--source/opt/dominator_analysis.h2
-rw-r--r--source/opt/dominator_tree.cpp6
-rw-r--r--source/opt/dominator_tree.h4
-rw-r--r--source/opt/eliminate_dead_constant_pass.cpp11
-rw-r--r--source/opt/eliminate_dead_constant_pass.h6
-rw-r--r--source/opt/eliminate_dead_functions_pass.cpp5
-rw-r--r--source/opt/eliminate_dead_functions_pass.h8
-rw-r--r--source/opt/feature_manager.cpp6
-rw-r--r--source/opt/feature_manager.h6
-rw-r--r--source/opt/flatten_decoration_pass.cpp7
-rw-r--r--source/opt/flatten_decoration_pass.h6
-rw-r--r--source/opt/fold.cpp12
-rw-r--r--source/opt/fold.h8
-rw-r--r--source/opt/fold_spec_constant_op_and_composite_pass.cpp10
-rw-r--r--source/opt/fold_spec_constant_op_and_composite_pass.h12
-rw-r--r--source/opt/folding_rules.cpp8
-rw-r--r--source/opt/folding_rules.h3
-rw-r--r--source/opt/freeze_spec_constant_value_pass.cpp4
-rw-r--r--source/opt/freeze_spec_constant_value_pass.h6
-rw-r--r--source/opt/function.cpp2
-rw-r--r--source/opt/function.h7
-rw-r--r--source/opt/if_conversion.cpp7
-rw-r--r--source/opt/if_conversion.h8
-rw-r--r--source/opt/inline_exhaustive_pass.cpp4
-rw-r--r--source/opt/inline_exhaustive_pass.h6
-rw-r--r--source/opt/inline_opaque_pass.cpp5
-rw-r--r--source/opt/inline_opaque_pass.h6
-rw-r--r--source/opt/inline_pass.cpp7
-rw-r--r--source/opt/inline_pass.h7
-rw-r--r--source/opt/instruction.cpp10
-rw-r--r--source/opt/instruction.h16
-rw-r--r--source/opt/instruction_list.cpp2
-rw-r--r--source/opt/instruction_list.h10
-rw-r--r--source/opt/ir_builder.h13
-rw-r--r--source/opt/ir_context.cpp11
-rw-r--r--source/opt/ir_context.h35
-rw-r--r--source/opt/ir_loader.cpp8
-rw-r--r--source/opt/ir_loader.h8
-rw-r--r--source/opt/iterator.h1
-rw-r--r--source/opt/licm_pass.cpp7
-rw-r--r--source/opt/licm_pass.h11
-rw-r--r--source/opt/local_access_chain_convert_pass.cpp6
-rw-r--r--source/opt/local_access_chain_convert_pass.h11
-rw-r--r--source/opt/local_redundancy_elimination.cpp4
-rw-r--r--source/opt/local_redundancy_elimination.h8
-rw-r--r--source/opt/local_single_block_elim_pass.cpp7
-rw-r--r--source/opt/local_single_block_elim_pass.h9
-rw-r--r--source/opt/local_single_store_elim_pass.cpp8
-rw-r--r--source/opt/local_single_store_elim_pass.h10
-rw-r--r--source/opt/local_ssa_elim_pass.cpp8
-rw-r--r--source/opt/local_ssa_elim_pass.h10
-rw-r--r--source/opt/loop_dependence.cpp8
-rw-r--r--source/opt/loop_dependence.h8
-rw-r--r--source/opt/loop_dependence_helpers.cpp10
-rw-r--r--source/opt/loop_descriptor.cpp21
-rw-r--r--source/opt/loop_descriptor.h9
-rw-r--r--source/opt/loop_fission.cpp7
-rw-r--r--source/opt/loop_fission.h12
-rw-r--r--source/opt/loop_fusion.cpp8
-rw-r--r--source/opt/loop_fusion.h9
-rw-r--r--source/opt/loop_fusion_pass.cpp10
-rw-r--r--source/opt/loop_fusion_pass.h2
-rw-r--r--source/opt/loop_peeling.cpp14
-rw-r--r--source/opt/loop_peeling.h11
-rw-r--r--source/opt/loop_unroller.cpp11
-rw-r--r--source/opt/loop_unroller.h3
-rw-r--r--source/opt/loop_unswitch_pass.cpp20
-rw-r--r--source/opt/loop_unswitch_pass.h4
-rw-r--r--source/opt/loop_utils.cpp13
-rw-r--r--source/opt/loop_utils.h7
-rw-r--r--source/opt/mem_pass.cpp16
-rw-r--r--source/opt/mem_pass.h10
-rw-r--r--source/opt/merge_return_pass.cpp16
-rw-r--r--source/opt/merge_return_pass.h9
-rw-r--r--source/opt/module.cpp6
-rw-r--r--source/opt/module.h6
-rw-r--r--source/opt/null_pass.h4
-rw-r--r--source/opt/optimizer.cpp20
-rw-r--r--source/opt/pass.cpp4
-rw-r--r--source/opt/pass.h8
-rw-r--r--source/opt/pass_manager.cpp7
-rw-r--r--source/opt/pass_manager.h9
-rw-r--r--source/opt/passes.h93
-rw-r--r--source/opt/private_to_local_pass.cpp15
-rw-r--r--source/opt/private_to_local_pass.h4
-rw-r--r--source/opt/propagator.cpp2
-rw-r--r--source/opt/propagator.h5
-rw-r--r--source/opt/reduce_load_size.cpp15
-rw-r--r--source/opt/reduce_load_size.h8
-rw-r--r--source/opt/redundancy_elimination.cpp4
-rw-r--r--source/opt/redundancy_elimination.h10
-rw-r--r--source/opt/reflect.h2
-rw-r--r--source/opt/register_pressure.cpp15
-rw-r--r--source/opt/register_pressure.h4
-rw-r--r--source/opt/remove_duplicates_pass.cpp14
-rw-r--r--source/opt/remove_duplicates_pass.h11
-rw-r--r--source/opt/replace_invalid_opc.cpp3
-rw-r--r--source/opt/replace_invalid_opc.h4
-rw-r--r--source/opt/scalar_analysis.cpp4
-rw-r--r--source/opt/scalar_analysis.h7
-rw-r--r--source/opt/scalar_analysis_nodes.h3
-rw-r--r--source/opt/scalar_analysis_simplification.cpp2
-rw-r--r--source/opt/scalar_replacement_pass.cpp16
-rw-r--r--source/opt/scalar_replacement_pass.h13
-rw-r--r--source/opt/set_spec_constant_default_value_pass.cpp14
-rw-r--r--source/opt/set_spec_constant_default_value_pass.h8
-rw-r--r--source/opt/simplification_pass.cpp4
-rw-r--r--source/opt/simplification_pass.h6
-rw-r--r--source/opt/ssa_rewrite_pass.cpp12
-rw-r--r--source/opt/ssa_rewrite_pass.h13
-rw-r--r--source/opt/strength_reduction_pass.cpp13
-rw-r--r--source/opt/strength_reduction_pass.h8
-rw-r--r--source/opt/strip_debug_info_pass.cpp4
-rw-r--r--source/opt/strip_debug_info_pass.h6
-rw-r--r--source/opt/strip_reflect_info_pass.cpp7
-rw-r--r--source/opt/strip_reflect_info_pass.h6
-rw-r--r--source/opt/type_manager.cpp11
-rw-r--r--source/opt/type_manager.h5
-rw-r--r--source/opt/types.cpp2
-rw-r--r--source/opt/types.h3
-rw-r--r--source/opt/unify_const_pass.cpp10
-rw-r--r--source/opt/unify_const_pass.h6
-rw-r--r--source/opt/value_number_table.cpp6
-rw-r--r--source/opt/value_number_table.h3
-rw-r--r--source/opt/vector_dce.cpp11
-rw-r--r--source/opt/vector_dce.h7
-rw-r--r--source/opt/workaround1209.cpp4
-rw-r--r--source/opt/workaround1209.h2
-rw-r--r--source/parsed_operand.cpp4
-rw-r--r--source/parsed_operand.h1
-rw-r--r--source/print.cpp2
-rw-r--r--source/spirv_constant.h2
-rw-r--r--source/spirv_definition.h2
-rw-r--r--source/spirv_endian.cpp2
-rw-r--r--source/spirv_stats.cpp22
-rw-r--r--source/spirv_stats.h1
-rw-r--r--source/spirv_target_env.cpp4
-rw-r--r--source/spirv_validator_options.cpp2
-rw-r--r--source/table.cpp2
-rw-r--r--source/table.h6
-rw-r--r--source/text.cpp32
-rw-r--r--source/text.h4
-rw-r--r--source/text_handler.cpp20
-rw-r--r--source/text_handler.h11
-rw-r--r--source/util/bit_stream.cpp2
-rw-r--r--source/util/bit_stream.h1
-rw-r--r--source/util/bit_vector.cpp2
-rw-r--r--source/util/hex_float.h2
-rw-r--r--source/util/huffman_codec.h2
-rw-r--r--source/util/ilist.h2
-rw-r--r--source/util/move_to_front.h1
-rw-r--r--source/util/parse_number.cpp4
-rw-r--r--source/util/parse_number.h2
-rw-r--r--source/util/small_vector.h4
-rw-r--r--source/util/string_utils.cpp2
-rw-r--r--source/util/string_utils.h2
-rw-r--r--source/util/timer.cpp2
-rw-r--r--source/val/basic_block.cpp2
-rw-r--r--source/val/basic_block.h5
-rw-r--r--source/val/construct.cpp5
-rw-r--r--source/val/construct.h4
-rw-r--r--source/val/decoration.h2
-rw-r--r--source/val/function.cpp10
-rw-r--r--source/val/function.h8
-rw-r--r--source/val/instruction.cpp2
-rw-r--r--source/val/instruction.h2
-rw-r--r--source/val/validate.h1
-rw-r--r--source/val/validate_arithmetics.cpp2
-rw-r--r--source/val/validate_barriers.cpp2
-rw-r--r--source/val/validate_builtins.cpp1
-rw-r--r--source/val/validate_capability.cpp1
-rw-r--r--source/val/validate_decorations.cpp1
-rw-r--r--source/val/validate_derivatives.cpp2
-rw-r--r--source/val/validate_ext_inst.cpp2
-rw-r--r--source/val/validate_id.cpp1
-rw-r--r--source/val/validate_image.cpp2
-rw-r--r--source/val/validate_instruction.cpp2
-rw-r--r--source/val/validate_interfaces.cpp1
-rw-r--r--source/val/validate_memory.cpp2
-rw-r--r--source/val/validation_state.cpp13
-rw-r--r--source/val/validation_state.h21
-rw-r--r--test/assembly_context_test.cpp6
-rw-r--r--test/assembly_format_test.cpp2
-rw-r--r--test/binary_destroy_test.cpp4
-rw-r--r--test/binary_endianness_test.cpp2
-rw-r--r--test/binary_header_get_test.cpp2
-rw-r--r--test/binary_parse_test.cpp8
-rw-r--r--test/binary_strnlen_s_test.cpp2
-rw-r--r--test/binary_to_text.literal_test.cpp7
-rw-r--r--test/binary_to_text_test.cpp9
-rw-r--r--test/bit_stream.cpp4
-rw-r--r--test/c_interface_test.cpp7
-rw-r--r--test/comment_test.cpp6
-rw-r--r--test/comp/markv_codec_test.cpp5
-rw-r--r--test/cpp_interface_test.cpp7
-rw-r--r--test/diagnostic_test.cpp3
-rw-r--r--test/enum_set_test.cpp8
-rw-r--r--test/enum_string_mapping_test.cpp6
-rw-r--r--test/ext_inst.debuginfo_test.cpp8
-rw-r--r--test/ext_inst.glsl_test.cpp5
-rw-r--r--test/ext_inst.opencl_test.cpp10
-rw-r--r--test/fix_word_test.cpp2
-rw-r--r--test/fuzzers/spvtools_opt_legalization_fuzzer.cpp1
-rw-r--r--test/fuzzers/spvtools_opt_performance_fuzzer.cpp1
-rw-r--r--test/fuzzers/spvtools_opt_size_fuzzer.cpp1
-rw-r--r--test/fuzzers/spvtools_val_fuzzer.cpp1
-rw-r--r--test/generator_magic_number_test.cpp9
-rw-r--r--test/hex_float_test.cpp8
-rw-r--r--test/huffman_codec.cpp7
-rw-r--r--test/immediate_int_test.cpp5
-rw-r--r--test/libspirv_macros_test.cpp2
-rw-r--r--test/link/binary_version_test.cpp4
-rw-r--r--test/link/entry_points_test.cpp4
-rw-r--r--test/link/global_values_amount_test.cpp4
-rw-r--r--test/link/ids_limit_test.cpp4
-rw-r--r--test/link/linker_fixture.h5
-rw-r--r--test/link/matching_imports_to_exports_test.cpp4
-rw-r--r--test/link/memory_model_test.cpp4
-rw-r--r--test/link/partial_linkage_test.cpp4
-rw-r--r--test/link/unique_ids_test.cpp5
-rw-r--r--test/log_test.cpp9
-rw-r--r--test/move_to_front_test.cpp4
-rw-r--r--test/name_mapper_test.cpp9
-rw-r--r--test/named_id_test.cpp5
-rw-r--r--test/opcode_make_test.cpp2
-rw-r--r--test/opcode_require_capabilities_test.cpp4
-rw-r--r--test/opcode_split_test.cpp2
-rw-r--r--test/opcode_table_get_test.cpp5
-rw-r--r--test/operand_capabilities_test.cpp6
-rw-r--r--test/operand_pattern_test.cpp3
-rw-r--r--test/operand_test.cpp4
-rw-r--r--test/opt/aggressive_dead_code_elim_test.cpp9
-rw-r--r--test/opt/assembly_builder_test.cpp6
-rw-r--r--test/opt/block_merge_test.cpp6
-rw-r--r--test/opt/ccp_test.cpp9
-rw-r--r--test/opt/cfg_cleanup_test.cpp6
-rw-r--r--test/opt/combine_access_chains_test.cpp8
-rw-r--r--test/opt/common_uniform_elim_test.cpp4
-rw-r--r--test/opt/compact_ids_test.cpp10
-rw-r--r--test/opt/constant_manager_test.cpp12
-rw-r--r--test/opt/copy_prop_array_test.cpp8
-rw-r--r--test/opt/dead_branch_elim_test.cpp6
-rw-r--r--test/opt/dead_insert_elim_test.cpp6
-rw-r--r--test/opt/dead_variable_elim_test.cpp6
-rw-r--r--test/opt/decoration_manager_test.cpp8
-rw-r--r--test/opt/def_use_test.cpp23
-rw-r--r--test/opt/dominator_tree/common_dominators.cpp10
-rw-r--r--test/opt/dominator_tree/generated.cpp17
-rw-r--r--test/opt/dominator_tree/nested_ifs.cpp14
-rw-r--r--test/opt/dominator_tree/nested_ifs_post.cpp15
-rw-r--r--test/opt/dominator_tree/nested_loops.cpp15
-rw-r--r--test/opt/dominator_tree/nested_loops_with_unreachables.cpp16
-rw-r--r--test/opt/dominator_tree/post.cpp16
-rw-r--r--test/opt/dominator_tree/simple.cpp16
-rw-r--r--test/opt/dominator_tree/switch_case_fallthrough.cpp16
-rw-r--r--test/opt/dominator_tree/unreachable_for.cpp16
-rw-r--r--test/opt/dominator_tree/unreachable_for_post.cpp16
-rw-r--r--test/opt/eliminate_dead_const_test.cpp10
-rw-r--r--test/opt/eliminate_dead_functions_test.cpp10
-rw-r--r--test/opt/feature_manager_test.cpp10
-rw-r--r--test/opt/flatten_decoration_test.cpp8
-rw-r--r--test/opt/fold_spec_const_op_composite_test.cpp9
-rw-r--r--test/opt/fold_test.cpp22
-rw-r--r--test/opt/freeze_spec_const_test.cpp8
-rw-r--r--test/opt/function_utils.h4
-rw-r--r--test/opt/if_conversion_test.cpp8
-rw-r--r--test/opt/inline_opaque_test.cpp6
-rw-r--r--test/opt/inline_test.cpp8
-rw-r--r--test/opt/insert_extract_elim_test.cpp8
-rw-r--r--test/opt/instruction_list_test.cpp6
-rw-r--r--test/opt/instruction_test.cpp14
-rw-r--r--test/opt/ir_builder.cpp21
-rw-r--r--test/opt/ir_context_test.cpp17
-rw-r--r--test/opt/ir_loader_test.cpp12
-rw-r--r--test/opt/iterator_test.cpp4
-rw-r--r--test/opt/line_debug_info_test.cpp4
-rw-r--r--test/opt/local_access_chain_convert_test.cpp6
-rw-r--r--test/opt/local_redundancy_elimination_test.cpp11
-rw-r--r--test/opt/local_single_block_elim.cpp6
-rw-r--r--test/opt/local_single_store_elim_test.cpp6
-rw-r--r--test/opt/local_ssa_elim_test.cpp7
-rw-r--r--test/opt/loop_optimizations/dependence_analysis.cpp22
-rw-r--r--test/opt/loop_optimizations/dependence_analysis_helpers.cpp24
-rw-r--r--test/opt/loop_optimizations/fusion_compatibility.cpp9
-rw-r--r--test/opt/loop_optimizations/fusion_illegal.cpp9
-rw-r--r--test/opt/loop_optimizations/fusion_legal.cpp11
-rw-r--r--test/opt/loop_optimizations/fusion_pass.cpp7
-rw-r--r--test/opt/loop_optimizations/hoist_all_loop_types.cpp7
-rw-r--r--test/opt/loop_optimizations/hoist_double_nested_loops.cpp7
-rw-r--r--test/opt/loop_optimizations/hoist_from_independent_loops.cpp7
-rw-r--r--test/opt/loop_optimizations/hoist_simple_case.cpp7
-rw-r--r--test/opt/loop_optimizations/hoist_single_nested_loops.cpp7
-rw-r--r--test/opt/loop_optimizations/hoist_without_preheader.cpp7
-rw-r--r--test/opt/loop_optimizations/lcssa.cpp18
-rw-r--r--test/opt/loop_optimizations/loop_descriptions.cpp15
-rw-r--r--test/opt/loop_optimizations/loop_fission.cpp20
-rw-r--r--test/opt/loop_optimizations/nested_loops.cpp20
-rw-r--r--test/opt/loop_optimizations/peeling.cpp15
-rw-r--r--test/opt/loop_optimizations/peeling_pass.cpp15
-rw-r--r--test/opt/loop_optimizations/unroll_assumptions.cpp18
-rw-r--r--test/opt/loop_optimizations/unroll_simple.cpp18
-rw-r--r--test/opt/loop_optimizations/unswitch.cpp7
-rw-r--r--test/opt/module_test.cpp12
-rw-r--r--test/opt/module_utils.h2
-rw-r--r--test/opt/optimizer_test.cpp7
-rw-r--r--test/opt/pass_fixture.h15
-rw-r--r--test/opt/pass_manager_test.cpp13
-rw-r--r--test/opt/pass_merge_return_test.cpp8
-rw-r--r--test/opt/pass_remove_duplicates_test.cpp8
-rw-r--r--test/opt/pass_test.cpp12
-rw-r--r--test/opt/pass_utils.cpp2
-rw-r--r--test/opt/pass_utils.h1
-rw-r--r--test/opt/private_to_local_test.cpp11
-rw-r--r--test/opt/propagator_test.cpp20
-rw-r--r--test/opt/reduce_load_size_test.cpp6
-rw-r--r--test/opt/redundancy_elimination_test.cpp11
-rw-r--r--test/opt/register_liveness.cpp14
-rw-r--r--test/opt/replace_invalid_opc_test.cpp10
-rw-r--r--test/opt/scalar_analysis.cpp22
-rw-r--r--test/opt/scalar_replacement_test.cpp8
-rw-r--r--test/opt/set_spec_const_default_value_test.cpp5
-rw-r--r--test/opt/simplification_test.cpp7
-rw-r--r--test/opt/strength_reduction_test.cpp12
-rw-r--r--test/opt/strip_debug_info_test.cpp6
-rw-r--r--test/opt/strip_reflect_info_test.cpp6
-rw-r--r--test/opt/type_manager_test.cpp18
-rw-r--r--test/opt/types_test.cpp8
-rw-r--r--test/opt/unify_const_test.cpp10
-rw-r--r--test/opt/utils_test.cpp6
-rw-r--r--test/opt/value_table_test.cpp9
-rw-r--r--test/opt/vector_dce_test.cpp6
-rw-r--r--test/opt/workaround1209_test.cpp11
-rw-r--r--test/parse_number_test.cpp1
-rw-r--r--test/preserve_numeric_ids_test.cpp2
-rw-r--r--test/software_version_test.cpp4
-rw-r--r--test/stats/stats_aggregate_test.cpp5
-rw-r--r--test/stats/stats_analyzer_test.cpp4
-rw-r--r--test/target_env_test.cpp6
-rw-r--r--test/test_fixture.h5
-rw-r--r--test/text_advance_test.cpp4
-rw-r--r--test/text_destroy_test.cpp2
-rw-r--r--test/text_literal_test.cpp11
-rw-r--r--test/text_start_new_inst_test.cpp4
-rw-r--r--test/text_to_binary.annotation_test.cpp7
-rw-r--r--test/text_to_binary.barrier_test.cpp5
-rw-r--r--test/text_to_binary.constant_test.cpp7
-rw-r--r--test/text_to_binary.control_flow_test.cpp6
-rw-r--r--test/text_to_binary.debug_test.cpp6
-rw-r--r--test/text_to_binary.device_side_enqueue_test.cpp6
-rw-r--r--test/text_to_binary.extension_test.cpp11
-rw-r--r--test/text_to_binary.function_test.cpp6
-rw-r--r--test/text_to_binary.group_test.cpp6
-rw-r--r--test/text_to_binary.image_test.cpp6
-rw-r--r--test/text_to_binary.literal_test.cpp4
-rw-r--r--test/text_to_binary.memory_test.cpp7
-rw-r--r--test/text_to_binary.misc_test.cpp4
-rw-r--r--test/text_to_binary.mode_setting_test.cpp7
-rw-r--r--test/text_to_binary.pipe_storage_test.cpp2
-rw-r--r--test/text_to_binary.reserved_sampling_test.cpp5
-rw-r--r--test/text_to_binary.subgroup_dispatch_test.cpp4
-rw-r--r--test/text_to_binary.type_declaration_test.cpp6
-rw-r--r--test/text_to_binary_test.cpp6
-rw-r--r--test/text_word_get_test.cpp4
-rw-r--r--test/unit_spirv.cpp4
-rw-r--r--test/unit_spirv.h4
-rw-r--r--test/util/bit_vector_test.cpp2
-rw-r--r--test/util/ilist_test.cpp4
-rw-r--r--test/util/small_vector_test.cpp4
-rw-r--r--test/val/val_adjacency_test.cpp4
-rw-r--r--test/val/val_arithmetics_test.cpp4
-rw-r--r--test/val/val_atomics_test.cpp4
-rw-r--r--test/val/val_barriers_test.cpp4
-rw-r--r--test/val/val_bitwise_test.cpp4
-rw-r--r--test/val/val_builtins_test.cpp6
-rw-r--r--test/val/val_capability_test.cpp12
-rw-r--r--test/val/val_cfg_test.cpp6
-rw-r--r--test/val/val_composites_test.cpp4
-rw-r--r--test/val/val_conversion_test.cpp4
-rw-r--r--test/val/val_data_test.cpp4
-rw-r--r--test/val/val_decoration_test.cpp7
-rw-r--r--test/val/val_derivatives_test.cpp4
-rw-r--r--test/val/val_explicit_reserved_test.cpp5
-rw-r--r--test/val/val_ext_inst_test.cpp5
-rw-r--r--test/val/val_extensions_test.cpp13
-rw-r--r--test/val/val_fixtures.h7
-rw-r--r--test/val/val_id_test.cpp7
-rw-r--r--test/val/val_image_test.cpp4
-rw-r--r--test/val/val_interfaces_test.cpp6
-rw-r--r--test/val/val_layout_test.cpp7
-rw-r--r--test/val/val_limits_test.cpp4
-rw-r--r--test/val/val_literals_test.cpp2
-rw-r--r--test/val/val_logicals_test.cpp4
-rw-r--r--test/val/val_non_uniform_test.cpp5
-rw-r--r--test/val/val_primitives_test.cpp4
-rw-r--r--test/val/val_ssa_test.cpp4
-rw-r--r--test/val/val_state_test.cpp18
-rw-r--r--test/val/val_storage_test.cpp2
-rw-r--r--test/val/val_type_unique_test.cpp4
-rw-r--r--test/val/val_validation_state_test.cpp6
-rw-r--r--test/val/val_version_test.cpp5
-rw-r--r--test/val/val_webgpu_test.cpp5
-rw-r--r--tools/cfg/bin_to_dot.cpp6
-rw-r--r--tools/cfg/bin_to_dot.h1
-rw-r--r--tools/cfg/cfg.cpp3
-rw-r--r--tools/comp/markv.cpp4
-rw-r--r--tools/comp/markv_model_factory.cpp4
-rw-r--r--tools/comp/markv_model_shader.cpp4
-rw-r--r--tools/opt/opt.cpp12
-rw-r--r--tools/stats/stats.cpp3
-rw-r--r--tools/stats/stats_analyzer.cpp7
-rw-r--r--tools/stats/stats_analyzer.h1
481 files changed, 2060 insertions, 1606 deletions
diff --git a/Android.mk b/Android.mk
index 163f9a36..6c556444 100644
--- a/Android.mk
+++ b/Android.mk
@@ -305,7 +305,6 @@ include $(CLEAR_VARS)
LOCAL_MODULE := SPIRV-Tools
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/include \
- $(LOCAL_PATH)/source \
$(LOCAL_PATH)/external/spirv-headers/include \
$(SPVTOOLS_OUT_PATH)
LOCAL_EXPORT_C_INCLUDES := \
diff --git a/BUILD.gn b/BUILD.gn
index f30cafdb..f19ccf19 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -262,7 +262,6 @@ config("spvtools_config") {
include_dirs = [
".",
"include",
- "source",
"$target_gen_dir",
"${spirv_headers}/include",
]
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4229fded..8e8e3d07 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -101,7 +101,6 @@ elseif(MSVC)
endif()
endif()
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/source)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/)
option(SPIRV_COLOR_TERMINAL "Enable color terminal output" ON)
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 3f89e8e3..ebf4fd32 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -19,9 +19,6 @@ for more details about the presubmit API built into depot_tools.
"""
LINT_FILTERS = [
- "-build/include",
- "-build/include_order",
- "-build/include_what_you_use",
"-build/storage_class",
"-readability/braces",
"-readability/casting",
diff --git a/source/assembly_grammar.cpp b/source/assembly_grammar.cpp
index f20810d9..4d98e3da 100644
--- a/source/assembly_grammar.cpp
+++ b/source/assembly_grammar.cpp
@@ -12,16 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "assembly_grammar.h"
+#include "source/assembly_grammar.h"
#include <algorithm>
#include <cassert>
#include <cstring>
-#include "ext_inst.h"
-#include "opcode.h"
-#include "operand.h"
-#include "table.h"
+#include "source/ext_inst.h"
+#include "source/opcode.h"
+#include "source/operand.h"
+#include "source/table.h"
namespace spvtools {
namespace {
diff --git a/source/assembly_grammar.h b/source/assembly_grammar.h
index 1053396a..17c2bd3b 100644
--- a/source/assembly_grammar.h
+++ b/source/assembly_grammar.h
@@ -15,11 +15,11 @@
#ifndef SOURCE_ASSEMBLY_GRAMMAR_H_
#define SOURCE_ASSEMBLY_GRAMMAR_H_
-#include "enum_set.h"
-#include "latest_version_spirv_header.h"
-#include "operand.h"
+#include "source/enum_set.h"
+#include "source/latest_version_spirv_header.h"
+#include "source/operand.h"
+#include "source/table.h"
#include "spirv-tools/libspirv.h"
-#include "table.h"
namespace spvtools {
diff --git a/source/binary.cpp b/source/binary.cpp
index 690ef0a5..6604d809 100644
--- a/source/binary.cpp
+++ b/source/binary.cpp
@@ -12,24 +12,25 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "binary.h"
+#include "source/binary.h"
#include <algorithm>
#include <cassert>
#include <cstring>
#include <iterator>
#include <limits>
+#include <string>
#include <unordered_map>
#include <vector>
-#include "assembly_grammar.h"
-#include "diagnostic.h"
-#include "ext_inst.h"
-#include "latest_version_spirv_header.h"
-#include "opcode.h"
-#include "operand.h"
-#include "spirv_constant.h"
-#include "spirv_endian.h"
+#include "source/assembly_grammar.h"
+#include "source/diagnostic.h"
+#include "source/ext_inst.h"
+#include "source/latest_version_spirv_header.h"
+#include "source/opcode.h"
+#include "source/operand.h"
+#include "source/spirv_constant.h"
+#include "source/spirv_endian.h"
spv_result_t spvBinaryHeaderGet(const spv_const_binary binary,
const spv_endianness_t endian,
diff --git a/source/binary.h b/source/binary.h
index a707bee7..66d24c7e 100644
--- a/source/binary.h
+++ b/source/binary.h
@@ -15,8 +15,8 @@
#ifndef SOURCE_BINARY_H_
#define SOURCE_BINARY_H_
+#include "source/spirv_definition.h"
#include "spirv-tools/libspirv.h"
-#include "spirv_definition.h"
// Functions
diff --git a/source/comp/markv.h b/source/comp/markv.h
index e687773f..16b49822 100644
--- a/source/comp/markv.h
+++ b/source/comp/markv.h
@@ -24,7 +24,7 @@
#include <string>
#include <vector>
-#include "comp/markv_model.h"
+#include "source/comp/markv_model.h"
#include "spirv-tools/libspirv.hpp"
namespace spvtools {
diff --git a/source/comp/markv_codec.cpp b/source/comp/markv_codec.cpp
index 825f2eb5..2956d8ed 100644
--- a/source/comp/markv_codec.cpp
+++ b/source/comp/markv_codec.cpp
@@ -26,39 +26,41 @@
#include <functional>
#include <iostream>
#include <iterator>
+#include <limits>
#include <list>
+#include <map>
#include <memory>
#include <numeric>
#include <string>
#include <unordered_map>
#include <unordered_set>
+#include <utility>
#include <vector>
-#include "latest_version_glsl_std_450_header.h"
-#include "latest_version_opencl_std_header.h"
-#include "latest_version_spirv_header.h"
-
-#include "binary.h"
-#include "diagnostic.h"
-#include "enum_string_mapping.h"
-#include "ext_inst.h"
-#include "extensions.h"
-#include "id_descriptor.h"
-#include "instruction.h"
-#include "markv.h"
-#include "markv_model.h"
-#include "opcode.h"
-#include "operand.h"
#include "source/assembly_grammar.h"
+#include "source/binary.h"
+#include "source/comp/markv.h"
+#include "source/comp/markv_model.h"
+#include "source/diagnostic.h"
+#include "source/enum_string_mapping.h"
+#include "source/ext_inst.h"
+#include "source/extensions.h"
+#include "source/id_descriptor.h"
+#include "source/instruction.h"
+#include "source/latest_version_glsl_std_450_header.h"
+#include "source/latest_version_opencl_std_header.h"
+#include "source/latest_version_spirv_header.h"
+#include "source/opcode.h"
+#include "source/operand.h"
+#include "source/spirv_endian.h"
+#include "source/spirv_validator_options.h"
+#include "source/util/bit_stream.h"
+#include "source/util/huffman_codec.h"
+#include "source/util/move_to_front.h"
+#include "source/util/parse_number.h"
+#include "source/val/instruction.h"
+#include "source/val/validate.h"
#include "spirv-tools/libspirv.h"
-#include "spirv_endian.h"
-#include "spirv_validator_options.h"
-#include "util/bit_stream.h"
-#include "util/huffman_codec.h"
-#include "util/move_to_front.h"
-#include "util/parse_number.h"
-#include "val/instruction.h"
-#include "val/validate.h"
namespace spvtools {
namespace comp {
diff --git a/source/comp/markv_model.h b/source/comp/markv_model.h
index 9533a5df..61ccf234 100644
--- a/source/comp/markv_model.h
+++ b/source/comp/markv_model.h
@@ -16,12 +16,15 @@
#define SOURCE_COMP_MARKV_MODEL_H_
#include <map>
+#include <memory>
+#include <string>
#include <unordered_set>
+#include <utility>
#include <vector>
-#include "latest_version_spirv_header.h"
+#include "source/latest_version_spirv_header.h"
+#include "source/util/huffman_codec.h"
#include "spirv-tools/libspirv.h"
-#include "util/huffman_codec.h"
namespace spvtools {
namespace comp {
diff --git a/source/diagnostic.cpp b/source/diagnostic.cpp
index ad9d3836..243e93c2 100644
--- a/source/diagnostic.cpp
+++ b/source/diagnostic.cpp
@@ -12,14 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "diagnostic.h"
+#include "source/diagnostic.h"
#include <cassert>
#include <cstring>
#include <iostream>
#include <sstream>
+#include <utility>
-#include "table.h"
+#include "source/table.h"
// Diagnostic API
diff --git a/source/disassemble.cpp b/source/disassemble.cpp
index 7bd64a73..11842cfc 100644
--- a/source/disassemble.cpp
+++ b/source/disassemble.cpp
@@ -21,20 +21,21 @@
#include <iomanip>
#include <memory>
#include <unordered_map>
-
-#include "assembly_grammar.h"
-#include "binary.h"
-#include "diagnostic.h"
-#include "disassemble.h"
-#include "ext_inst.h"
-#include "name_mapper.h"
-#include "opcode.h"
-#include "parsed_operand.h"
-#include "print.h"
+#include <utility>
+
+#include "source/assembly_grammar.h"
+#include "source/binary.h"
+#include "source/diagnostic.h"
+#include "source/disassemble.h"
+#include "source/ext_inst.h"
+#include "source/name_mapper.h"
+#include "source/opcode.h"
+#include "source/parsed_operand.h"
+#include "source/print.h"
+#include "source/spirv_constant.h"
+#include "source/spirv_endian.h"
+#include "source/util/hex_float.h"
#include "spirv-tools/libspirv.h"
-#include "spirv_constant.h"
-#include "spirv_endian.h"
-#include "util/hex_float.h"
namespace {
diff --git a/source/enum_set.h b/source/enum_set.h
index 95cfc497..b428effb 100644
--- a/source/enum_set.h
+++ b/source/enum_set.h
@@ -21,7 +21,7 @@
#include <set>
#include <utility>
-#include "latest_version_spirv_header.h"
+#include "source/latest_version_spirv_header.h"
namespace spvtools {
diff --git a/source/enum_string_mapping.cpp b/source/enum_string_mapping.cpp
index 20bbdfc1..32361a08 100644
--- a/source/enum_string_mapping.cpp
+++ b/source/enum_string_mapping.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "enum_string_mapping.h"
+#include "source/enum_string_mapping.h"
#include <algorithm>
#include <cassert>
@@ -20,7 +20,7 @@
#include <string>
#include <unordered_map>
-#include "extensions.h"
+#include "source/extensions.h"
namespace spvtools {
diff --git a/source/enum_string_mapping.h b/source/enum_string_mapping.h
index e8f00ebf..af8f56b8 100644
--- a/source/enum_string_mapping.h
+++ b/source/enum_string_mapping.h
@@ -17,8 +17,8 @@
#include <string>
-#include "extensions.h"
-#include "latest_version_spirv_header.h"
+#include "source/extensions.h"
+#include "source/latest_version_spirv_header.h"
namespace spvtools {
diff --git a/source/ext_inst.cpp b/source/ext_inst.cpp
index acc6dc65..a4c00c2f 100644
--- a/source/ext_inst.cpp
+++ b/source/ext_inst.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "ext_inst.h"
+#include "source/ext_inst.h"
#include <cassert>
#include <cstring>
@@ -22,14 +22,14 @@
// TODO(dneto): DebugInfo.h should probably move to SPIRV-Headers.
#include "DebugInfo.h"
-#include "latest_version_glsl_std_450_header.h"
-#include "latest_version_opencl_std_header.h"
-#include "macro.h"
-#include "spirv_definition.h"
+#include "source/latest_version_glsl_std_450_header.h"
+#include "source/latest_version_opencl_std_header.h"
+#include "source/macro.h"
+#include "source/spirv_definition.h"
-#include "debuginfo.insts.inc" // defines opencl_entries
-#include "glsl.std.450.insts.inc" // defines glsl_entries
-#include "opencl.std.insts.inc" // defines opencl_entries
+#include "debuginfo.insts.inc"
+#include "glsl.std.450.insts.inc"
+#include "opencl.std.insts.inc"
#include "spv-amd-gcn-shader.insts.inc"
#include "spv-amd-shader-ballot.insts.inc"
diff --git a/source/ext_inst.h b/source/ext_inst.h
index 18cbf01e..a821cc2b 100644
--- a/source/ext_inst.h
+++ b/source/ext_inst.h
@@ -15,8 +15,8 @@
#ifndef SOURCE_EXT_INST_H_
#define SOURCE_EXT_INST_H_
+#include "source/table.h"
#include "spirv-tools/libspirv.h"
-#include "table.h"
// Gets the type of the extended instruction set with the specified name.
spv_ext_inst_type_t spvExtInstImportTypeGet(const char* name);
diff --git a/source/extensions.cpp b/source/extensions.cpp
index bf3849cb..a94db273 100644
--- a/source/extensions.cpp
+++ b/source/extensions.cpp
@@ -12,13 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "extensions.h"
+#include "source/extensions.h"
#include <cassert>
#include <sstream>
#include <string>
-#include "enum_string_mapping.h"
+#include "source/enum_string_mapping.h"
namespace spvtools {
diff --git a/source/extensions.h b/source/extensions.h
index 4b0c9119..8023444c 100644
--- a/source/extensions.h
+++ b/source/extensions.h
@@ -17,7 +17,7 @@
#include <string>
-#include "enum_set.h"
+#include "source/enum_set.h"
#include "spirv-tools/libspirv.h"
namespace spvtools {
diff --git a/source/id_descriptor.cpp b/source/id_descriptor.cpp
index 9dd43277..d44ed672 100644
--- a/source/id_descriptor.cpp
+++ b/source/id_descriptor.cpp
@@ -12,13 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "id_descriptor.h"
+#include "source/id_descriptor.h"
#include <cassert>
#include <iostream>
-#include "opcode.h"
-#include "operand.h"
+#include "source/opcode.h"
+#include "source/operand.h"
namespace spvtools {
namespace {
diff --git a/source/instruction.h b/source/instruction.h
index 439a5ada..9e7dccd0 100644
--- a/source/instruction.h
+++ b/source/instruction.h
@@ -18,7 +18,7 @@
#include <cstdint>
#include <vector>
-#include "latest_version_spirv_header.h"
+#include "source/latest_version_spirv_header.h"
#include "spirv-tools/libspirv.h"
// Describes an instruction.
diff --git a/source/libspirv.cpp b/source/libspirv.cpp
index c9976ca4..53a4ffb8 100644
--- a/source/libspirv.cpp
+++ b/source/libspirv.cpp
@@ -14,7 +14,11 @@
#include "spirv-tools/libspirv.hpp"
-#include "table.h"
+#include <string>
+#include <utility>
+#include <vector>
+
+#include "source/table.h"
namespace spvtools {
diff --git a/source/link/linker.cpp b/source/link/linker.cpp
index 4a7e8063..5279c780 100644
--- a/source/link/linker.cpp
+++ b/source/link/linker.cpp
@@ -14,26 +14,28 @@
#include "spirv-tools/linker.hpp"
+#include <algorithm>
#include <cstdio>
#include <cstring>
-
-#include <algorithm>
#include <iostream>
+#include <memory>
+#include <string>
#include <unordered_map>
#include <unordered_set>
+#include <utility>
#include <vector>
-#include "assembly_grammar.h"
-#include "diagnostic.h"
-#include "opt/build_module.h"
-#include "opt/compact_ids_pass.h"
-#include "opt/decoration_manager.h"
-#include "opt/ir_loader.h"
-#include "opt/make_unique.h"
-#include "opt/pass_manager.h"
-#include "opt/remove_duplicates_pass.h"
+#include "source/assembly_grammar.h"
+#include "source/diagnostic.h"
+#include "source/opt/build_module.h"
+#include "source/opt/compact_ids_pass.h"
+#include "source/opt/decoration_manager.h"
+#include "source/opt/ir_loader.h"
+#include "source/opt/make_unique.h"
+#include "source/opt/pass_manager.h"
+#include "source/opt/remove_duplicates_pass.h"
+#include "source/spirv_target_env.h"
#include "spirv-tools/libspirv.hpp"
-#include "spirv_target_env.h"
namespace spvtools {
namespace {
diff --git a/source/message.cpp b/source/message.cpp
index 030fa4e2..d7e2f3cc 100644
--- a/source/message.cpp
+++ b/source/message.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "message.h"
+#include "source/message.h"
#include <sstream>
diff --git a/source/name_mapper.cpp b/source/name_mapper.cpp
index d41eb31b..43fdfb34 100644
--- a/source/name_mapper.cpp
+++ b/source/name_mapper.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "name_mapper.h"
+#include "source/name_mapper.h"
#include <algorithm>
#include <cassert>
@@ -24,8 +24,8 @@
#include "spirv-tools/libspirv.h"
-#include "latest_version_spirv_header.h"
-#include "parsed_operand.h"
+#include "source/latest_version_spirv_header.h"
+#include "source/parsed_operand.h"
namespace spvtools {
namespace {
diff --git a/source/name_mapper.h b/source/name_mapper.h
index 2f94d5e0..6902141b 100644
--- a/source/name_mapper.h
+++ b/source/name_mapper.h
@@ -20,7 +20,7 @@
#include <unordered_map>
#include <unordered_set>
-#include "assembly_grammar.h"
+#include "source/assembly_grammar.h"
#include "spirv-tools/libspirv.h"
namespace spvtools {
diff --git a/source/opcode.cpp b/source/opcode.cpp
index f03da6cf..af34b646 100644
--- a/source/opcode.cpp
+++ b/source/opcode.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "opcode.h"
+#include "source/opcode.h"
#include <assert.h>
#include <string.h>
@@ -20,12 +20,12 @@
#include <algorithm>
#include <cstdlib>
-#include "instruction.h"
-#include "macro.h"
+#include "source/instruction.h"
+#include "source/macro.h"
+#include "source/spirv_constant.h"
+#include "source/spirv_endian.h"
+#include "source/spirv_target_env.h"
#include "spirv-tools/libspirv.h"
-#include "spirv_constant.h"
-#include "spirv_endian.h"
-#include "spirv_target_env.h"
namespace {
struct OpcodeDescPtrLen {
@@ -33,7 +33,7 @@ struct OpcodeDescPtrLen {
uint32_t len;
};
-#include "core.insts-unified1.inc" // defines kOpcodeTableEntries_1_3
+#include "core.insts-unified1.inc"
static const spv_opcode_table_t kOpcodeTable = {ARRAY_SIZE(kOpcodeTableEntries),
kOpcodeTableEntries};
diff --git a/source/opcode.h b/source/opcode.h
index 78462043..5643a64c 100644
--- a/source/opcode.h
+++ b/source/opcode.h
@@ -15,10 +15,10 @@
#ifndef SOURCE_OPCODE_H_
#define SOURCE_OPCODE_H_
-#include "instruction.h"
-#include "latest_version_spirv_header.h"
+#include "source/instruction.h"
+#include "source/latest_version_spirv_header.h"
+#include "source/table.h"
#include "spirv-tools/libspirv.h"
-#include "table.h"
// Returns the name of a registered SPIR-V generator as a null-terminated
// string. If the generator is not known, then returns the string "Unknown".
diff --git a/source/operand.cpp b/source/operand.cpp
index 01e51d2f..c97b13fc 100644
--- a/source/operand.cpp
+++ b/source/operand.cpp
@@ -12,15 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "operand.h"
+#include "source/operand.h"
#include <assert.h>
#include <string.h>
#include <algorithm>
-#include "macro.h"
-#include "spirv_constant.h"
-#include "spirv_target_env.h"
+#include "source/macro.h"
+#include "source/spirv_constant.h"
+#include "source/spirv_target_env.h"
// For now, assume unified1 contains up to SPIR-V 1.3 and no later
// SPIR-V version.
diff --git a/source/operand.h b/source/operand.h
index b2567374..76f16f7a 100644
--- a/source/operand.h
+++ b/source/operand.h
@@ -16,9 +16,10 @@
#define SOURCE_OPERAND_H_
#include <functional>
+#include <vector>
+#include "source/table.h"
#include "spirv-tools/libspirv.h"
-#include "table.h"
// A sequence of operand types.
//
diff --git a/source/opt/aggressive_dead_code_elim_pass.cpp b/source/opt/aggressive_dead_code_elim_pass.cpp
index 54fc8d71..39970a56 100644
--- a/source/opt/aggressive_dead_code_elim_pass.cpp
+++ b/source/opt/aggressive_dead_code_elim_pass.cpp
@@ -15,15 +15,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "aggressive_dead_code_elim_pass.h"
-
-#include "cfa.h"
-#include "iterator.h"
-#include "latest_version_glsl_std_450_header.h"
-#include "reflect.h"
+#include "source/opt/aggressive_dead_code_elim_pass.h"
+#include <memory>
#include <stack>
+#include "source/cfa.h"
+#include "source/latest_version_glsl_std_450_header.h"
+#include "source/opt/iterator.h"
+#include "source/opt/reflect.h"
+
namespace spvtools {
namespace opt {
diff --git a/source/opt/aggressive_dead_code_elim_pass.h b/source/opt/aggressive_dead_code_elim_pass.h
index 9c25505c..73457cee 100644
--- a/source/opt/aggressive_dead_code_elim_pass.h
+++ b/source/opt/aggressive_dead_code_elim_pass.h
@@ -17,18 +17,21 @@
#ifndef SOURCE_OPT_AGGRESSIVE_DEAD_CODE_ELIM_PASS_H_
#define SOURCE_OPT_AGGRESSIVE_DEAD_CODE_ELIM_PASS_H_
-#include <util/bit_vector.h>
#include <algorithm>
+#include <list>
#include <map>
#include <queue>
+#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
+#include <vector>
-#include "basic_block.h"
-#include "def_use_manager.h"
-#include "mem_pass.h"
-#include "module.h"
+#include "source/opt/basic_block.h"
+#include "source/opt/def_use_manager.h"
+#include "source/opt/mem_pass.h"
+#include "source/opt/module.h"
+#include "source/util/bit_vector.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/basic_block.cpp b/source/opt/basic_block.cpp
index 9d101ba2..1165efd0 100644
--- a/source/opt/basic_block.cpp
+++ b/source/opt/basic_block.cpp
@@ -12,16 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "basic_block.h"
-#include "function.h"
-#include "ir_context.h"
-#include "module.h"
-#include "reflect.h"
-
-#include "make_unique.h"
+#include "source/opt/basic_block.h"
#include <ostream>
+#include "source/opt/function.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/make_unique.h"
+#include "source/opt/module.h"
+#include "source/opt/reflect.h"
+
namespace spvtools {
namespace opt {
namespace {
diff --git a/source/opt/basic_block.h b/source/opt/basic_block.h
index f67b920b..9e1706e1 100644
--- a/source/opt/basic_block.h
+++ b/source/opt/basic_block.h
@@ -22,12 +22,13 @@
#include <iterator>
#include <memory>
#include <ostream>
+#include <string>
#include <utility>
#include <vector>
-#include "instruction.h"
-#include "instruction_list.h"
-#include "iterator.h"
+#include "source/opt/instruction.h"
+#include "source/opt/instruction_list.h"
+#include "source/opt/iterator.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/block_merge_pass.cpp b/source/opt/block_merge_pass.cpp
index 9d5bc5cd..aa4c1bd9 100644
--- a/source/opt/block_merge_pass.cpp
+++ b/source/opt/block_merge_pass.cpp
@@ -14,10 +14,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "block_merge_pass.h"
+#include "source/opt/block_merge_pass.h"
-#include "ir_context.h"
-#include "iterator.h"
+#include <vector>
+
+#include "source/opt/ir_context.h"
+#include "source/opt/iterator.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/block_merge_pass.h b/source/opt/block_merge_pass.h
index 08891d40..0ecde488 100644
--- a/source/opt/block_merge_pass.h
+++ b/source/opt/block_merge_pass.h
@@ -24,11 +24,11 @@
#include <unordered_set>
#include <utility>
-#include "basic_block.h"
-#include "def_use_manager.h"
-#include "ir_context.h"
-#include "module.h"
-#include "pass.h"
+#include "source/opt/basic_block.h"
+#include "source/opt/def_use_manager.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/module.h"
+#include "source/opt/pass.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/build_module.cpp b/source/opt/build_module.cpp
index e0b2ce1b..a724994b 100644
--- a/source/opt/build_module.cpp
+++ b/source/opt/build_module.cpp
@@ -12,12 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "build_module.h"
+#include "source/opt/build_module.h"
-#include "ir_context.h"
-#include "ir_loader.h"
-#include "make_unique.h"
-#include "table.h"
+#include <utility>
+#include <vector>
+
+#include "source/opt/ir_context.h"
+#include "source/opt/ir_loader.h"
+#include "source/opt/make_unique.h"
+#include "source/table.h"
namespace spvtools {
namespace {
diff --git a/source/opt/build_module.h b/source/opt/build_module.h
index 71e963c8..c9d1cf2e 100644
--- a/source/opt/build_module.h
+++ b/source/opt/build_module.h
@@ -18,8 +18,8 @@
#include <memory>
#include <string>
-#include "ir_context.h"
-#include "module.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/module.h"
#include "spirv-tools/libspirv.hpp"
namespace spvtools {
diff --git a/source/opt/ccp_pass.cpp b/source/opt/ccp_pass.cpp
index 570d2022..a8411d9f 100644
--- a/source/opt/ccp_pass.cpp
+++ b/source/opt/ccp_pass.cpp
@@ -16,13 +16,16 @@
//
// Constant propagation with conditional branches,
// Wegman and Zadeck, ACM TOPLAS 13(2):181-210.
-#include "ccp_pass.h"
-#include "fold.h"
-#include "function.h"
-#include "module.h"
-#include "propagator.h"
+
+#include "source/opt/ccp_pass.h"
#include <algorithm>
+#include <limits>
+
+#include "source/opt/fold.h"
+#include "source/opt/function.h"
+#include "source/opt/module.h"
+#include "source/opt/propagator.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/ccp_pass.h b/source/opt/ccp_pass.h
index 15a82e1d..178fd128 100644
--- a/source/opt/ccp_pass.h
+++ b/source/opt/ccp_pass.h
@@ -15,12 +15,15 @@
#ifndef SOURCE_OPT_CCP_PASS_H_
#define SOURCE_OPT_CCP_PASS_H_
-#include "constants.h"
-#include "function.h"
-#include "ir_context.h"
-#include "mem_pass.h"
-#include "module.h"
-#include "propagator.h"
+#include <memory>
+#include <unordered_map>
+
+#include "source/opt/constants.h"
+#include "source/opt/function.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/mem_pass.h"
+#include "source/opt/module.h"
+#include "source/opt/propagator.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/cfg.cpp b/source/opt/cfg.cpp
index fa3e50f3..dcf2b573 100644
--- a/source/opt/cfg.cpp
+++ b/source/opt/cfg.cpp
@@ -12,11 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "cfg.h"
-#include "cfa.h"
-#include "ir_builder.h"
-#include "ir_context.h"
-#include "module.h"
+#include "source/opt/cfg.h"
+
+#include <memory>
+#include <utility>
+
+#include "source/cfa.h"
+#include "source/opt/ir_builder.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/module.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/cfg.h b/source/opt/cfg.h
index f1dff650..375d09c5 100644
--- a/source/opt/cfg.h
+++ b/source/opt/cfg.h
@@ -15,12 +15,13 @@
#ifndef SOURCE_OPT_CFG_H_
#define SOURCE_OPT_CFG_H_
-#include "basic_block.h"
-
#include <algorithm>
#include <list>
#include <unordered_map>
#include <unordered_set>
+#include <vector>
+
+#include "source/opt/basic_block.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/cfg_cleanup_pass.cpp b/source/opt/cfg_cleanup_pass.cpp
index ac99135e..2d548462 100644
--- a/source/opt/cfg_cleanup_pass.cpp
+++ b/source/opt/cfg_cleanup_pass.cpp
@@ -19,10 +19,10 @@
#include <queue>
#include <unordered_set>
-#include "cfg_cleanup_pass.h"
+#include "source/opt/cfg_cleanup_pass.h"
-#include "function.h"
-#include "module.h"
+#include "source/opt/function.h"
+#include "source/opt/module.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/cfg_cleanup_pass.h b/source/opt/cfg_cleanup_pass.h
index 065c8dd1..afbc67c0 100644
--- a/source/opt/cfg_cleanup_pass.h
+++ b/source/opt/cfg_cleanup_pass.h
@@ -15,9 +15,9 @@
#ifndef SOURCE_OPT_CFG_CLEANUP_PASS_H_
#define SOURCE_OPT_CFG_CLEANUP_PASS_H_
-#include "function.h"
-#include "mem_pass.h"
-#include "module.h"
+#include "source/opt/function.h"
+#include "source/opt/mem_pass.h"
+#include "source/opt/module.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/combine_access_chains.cpp b/source/opt/combine_access_chains.cpp
index ccefb258..facfc24b 100644
--- a/source/opt/combine_access_chains.cpp
+++ b/source/opt/combine_access_chains.cpp
@@ -12,11 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "combine_access_chains.h"
+#include "source/opt/combine_access_chains.h"
-#include "constants.h"
-#include "ir_builder.h"
-#include "ir_context.h"
+#include <utility>
+
+#include "source/opt/constants.h"
+#include "source/opt/ir_builder.h"
+#include "source/opt/ir_context.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/combine_access_chains.h b/source/opt/combine_access_chains.h
index bbf6de0e..75885dad 100644
--- a/source/opt/combine_access_chains.h
+++ b/source/opt/combine_access_chains.h
@@ -15,7 +15,9 @@
#ifndef SOURCE_OPT_COMBINE_ACCESS_CHAINS_H_
#define SOURCE_OPT_COMBINE_ACCESS_CHAINS_H_
-#include "pass.h"
+#include <vector>
+
+#include "source/opt/pass.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/common_uniform_elim_pass.cpp b/source/opt/common_uniform_elim_pass.cpp
index e6a2b1c8..f7fe0b9e 100644
--- a/source/opt/common_uniform_elim_pass.cpp
+++ b/source/opt/common_uniform_elim_pass.cpp
@@ -14,9 +14,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "common_uniform_elim_pass.h"
-#include "cfa.h"
-#include "ir_context.h"
+#include "source/opt/common_uniform_elim_pass.h"
+#include "source/cfa.h"
+#include "source/opt/ir_context.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/common_uniform_elim_pass.h b/source/opt/common_uniform_elim_pass.h
index e3a6106e..e6ef69c5 100644
--- a/source/opt/common_uniform_elim_pass.h
+++ b/source/opt/common_uniform_elim_pass.h
@@ -18,18 +18,22 @@
#define SOURCE_OPT_COMMON_UNIFORM_ELIM_PASS_H_
#include <algorithm>
+#include <list>
#include <map>
+#include <memory>
#include <queue>
+#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
-
-#include "basic_block.h"
-#include "decoration_manager.h"
-#include "def_use_manager.h"
-#include "ir_context.h"
-#include "module.h"
-#include "pass.h"
+#include <vector>
+
+#include "source/opt/basic_block.h"
+#include "source/opt/decoration_manager.h"
+#include "source/opt/def_use_manager.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/module.h"
+#include "source/opt/pass.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/compact_ids_pass.cpp b/source/opt/compact_ids_pass.cpp
index 7fe58228..68b940f1 100644
--- a/source/opt/compact_ids_pass.cpp
+++ b/source/opt/compact_ids_pass.cpp
@@ -12,12 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "compact_ids_pass.h"
-#include "ir_context.h"
+#include "source/opt/compact_ids_pass.h"
#include <cassert>
#include <unordered_map>
+#include "source/opt/ir_context.h"
+
namespace spvtools {
namespace opt {
diff --git a/source/opt/compact_ids_pass.h b/source/opt/compact_ids_pass.h
index a73f1815..d97ae0fa 100644
--- a/source/opt/compact_ids_pass.h
+++ b/source/opt/compact_ids_pass.h
@@ -15,9 +15,9 @@
#ifndef SOURCE_OPT_COMPACT_IDS_PASS_H_
#define SOURCE_OPT_COMPACT_IDS_PASS_H_
-#include "ir_context.h"
-#include "module.h"
-#include "pass.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/module.h"
+#include "source/opt/pass.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/composite.cpp b/source/opt/composite.cpp
index 8d35d05b..2b4dca25 100644
--- a/source/opt/composite.cpp
+++ b/source/opt/composite.cpp
@@ -14,14 +14,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "composite.h"
-
-#include "ir_context.h"
-#include "iterator.h"
-#include "spirv/1.2/GLSL.std.450.h"
+#include "source/opt/composite.h"
#include <vector>
+#include "source/opt/ir_context.h"
+#include "source/opt/iterator.h"
+#include "spirv/1.2/GLSL.std.450.h"
+
namespace spvtools {
namespace opt {
diff --git a/source/opt/composite.h b/source/opt/composite.h
index 376ae349..3cc036e4 100644
--- a/source/opt/composite.h
+++ b/source/opt/composite.h
@@ -22,11 +22,12 @@
#include <unordered_map>
#include <unordered_set>
#include <utility>
+#include <vector>
-#include "basic_block.h"
-#include "def_use_manager.h"
-#include "ir_context.h"
-#include "module.h"
+#include "source/opt/basic_block.h"
+#include "source/opt/def_use_manager.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/module.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/const_folding_rules.cpp b/source/opt/const_folding_rules.cpp
index 6b94986e..f6013a3d 100644
--- a/source/opt/const_folding_rules.cpp
+++ b/source/opt/const_folding_rules.cpp
@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "const_folding_rules.h"
+#include "source/opt/const_folding_rules.h"
-#include "ir_context.h"
+#include "source/opt/ir_context.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/const_folding_rules.h b/source/opt/const_folding_rules.h
index f1f46e27..c1865792 100644
--- a/source/opt/const_folding_rules.h
+++ b/source/opt/const_folding_rules.h
@@ -15,9 +15,10 @@
#ifndef SOURCE_OPT_CONST_FOLDING_RULES_H_
#define SOURCE_OPT_CONST_FOLDING_RULES_H_
+#include <unordered_map>
#include <vector>
-#include "constants.h"
+#include "source/opt/constants.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/constants.cpp b/source/opt/constants.cpp
index ba7fc6b8..b1e4bee4 100644
--- a/source/opt/constants.cpp
+++ b/source/opt/constants.cpp
@@ -12,12 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "constants.h"
-#include "ir_context.h"
+#include "source/opt/constants.h"
#include <unordered_map>
#include <vector>
+#include "source/opt/ir_context.h"
+
namespace spvtools {
namespace opt {
namespace analysis {
diff --git a/source/opt/constants.h b/source/opt/constants.h
index 99e7d1ce..6fb22a53 100644
--- a/source/opt/constants.h
+++ b/source/opt/constants.h
@@ -16,17 +16,18 @@
#define SOURCE_OPT_CONSTANTS_H_
#include <cinttypes>
+#include <map>
#include <memory>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
-#include "make_unique.h"
-#include "module.h"
-#include "type_manager.h"
-#include "types.h"
-#include "util/hex_float.h"
+#include "source/opt/make_unique.h"
+#include "source/opt/module.h"
+#include "source/opt/type_manager.h"
+#include "source/opt/types.h"
+#include "source/util/hex_float.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/copy_prop_arrays.cpp b/source/opt/copy_prop_arrays.cpp
index 6fa232fe..028b237d 100644
--- a/source/opt/copy_prop_arrays.cpp
+++ b/source/opt/copy_prop_arrays.cpp
@@ -12,8 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "copy_prop_arrays.h"
-#include "ir_builder.h"
+#include "source/opt/copy_prop_arrays.h"
+
+#include <utility>
+
+#include "source/opt/ir_builder.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/copy_prop_arrays.h b/source/opt/copy_prop_arrays.h
index 37a9aad5..abc07165 100644
--- a/source/opt/copy_prop_arrays.h
+++ b/source/opt/copy_prop_arrays.h
@@ -15,7 +15,10 @@
#ifndef SOURCE_OPT_COPY_PROP_ARRAYS_H_
#define SOURCE_OPT_COPY_PROP_ARRAYS_H_
-#include "mem_pass.h"
+#include <memory>
+#include <vector>
+
+#include "source/opt/mem_pass.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/dead_branch_elim_pass.cpp b/source/opt/dead_branch_elim_pass.cpp
index b0a7ab63..e031d396 100644
--- a/source/opt/dead_branch_elim_pass.cpp
+++ b/source/opt/dead_branch_elim_pass.cpp
@@ -15,12 +15,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "dead_branch_elim_pass.h"
+#include "source/opt/dead_branch_elim_pass.h"
-#include "cfa.h"
-#include "ir_context.h"
-#include "iterator.h"
-#include "make_unique.h"
+#include <list>
+#include <memory>
+#include <vector>
+
+#include "source/cfa.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/iterator.h"
+#include "source/opt/make_unique.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/dead_branch_elim_pass.h b/source/opt/dead_branch_elim_pass.h
index 42ec8011..4c6fb5c9 100644
--- a/source/opt/dead_branch_elim_pass.h
+++ b/source/opt/dead_branch_elim_pass.h
@@ -23,11 +23,12 @@
#include <unordered_map>
#include <unordered_set>
#include <utility>
+#include <vector>
-#include "basic_block.h"
-#include "def_use_manager.h"
-#include "mem_pass.h"
-#include "module.h"
+#include "source/opt/basic_block.h"
+#include "source/opt/def_use_manager.h"
+#include "source/opt/mem_pass.h"
+#include "source/opt/module.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/dead_insert_elim_pass.cpp b/source/opt/dead_insert_elim_pass.cpp
index 53bdad4e..b42588ff 100644
--- a/source/opt/dead_insert_elim_pass.cpp
+++ b/source/opt/dead_insert_elim_pass.cpp
@@ -14,15 +14,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "dead_insert_elim_pass.h"
+#include "source/opt/dead_insert_elim_pass.h"
-#include "composite.h"
-#include "ir_context.h"
-#include "iterator.h"
+#include "source/opt/composite.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/iterator.h"
#include "spirv/1.2/GLSL.std.450.h"
-#include <vector>
-
namespace spvtools {
namespace opt {
diff --git a/source/opt/dead_insert_elim_pass.h b/source/opt/dead_insert_elim_pass.h
index 5df969d5..0b111d02 100644
--- a/source/opt/dead_insert_elim_pass.h
+++ b/source/opt/dead_insert_elim_pass.h
@@ -22,12 +22,13 @@
#include <unordered_map>
#include <unordered_set>
#include <utility>
+#include <vector>
-#include "basic_block.h"
-#include "def_use_manager.h"
-#include "ir_context.h"
-#include "mem_pass.h"
-#include "module.h"
+#include "source/opt/basic_block.h"
+#include "source/opt/def_use_manager.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/mem_pass.h"
+#include "source/opt/module.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/dead_variable_elimination.cpp b/source/opt/dead_variable_elimination.cpp
index bdd97083..28371068 100644
--- a/source/opt/dead_variable_elimination.cpp
+++ b/source/opt/dead_variable_elimination.cpp
@@ -12,10 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "dead_variable_elimination.h"
+#include "source/opt/dead_variable_elimination.h"
-#include "ir_context.h"
-#include "reflect.h"
+#include <vector>
+
+#include "source/opt/ir_context.h"
+#include "source/opt/reflect.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/dead_variable_elimination.h b/source/opt/dead_variable_elimination.h
index be1f7884..052a754b 100644
--- a/source/opt/dead_variable_elimination.h
+++ b/source/opt/dead_variable_elimination.h
@@ -18,8 +18,8 @@
#include <climits>
#include <unordered_map>
-#include "decoration_manager.h"
-#include "mem_pass.h"
+#include "source/opt/decoration_manager.h"
+#include "source/opt/mem_pass.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/decoration_manager.cpp b/source/opt/decoration_manager.cpp
index f218e149..aeddb88c 100644
--- a/source/opt/decoration_manager.cpp
+++ b/source/opt/decoration_manager.cpp
@@ -12,13 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "decoration_manager.h"
+#include "source/opt/decoration_manager.h"
#include <algorithm>
+#include <memory>
#include <set>
#include <stack>
+#include <utility>
-#include "ir_context.h"
+#include "source/opt/ir_context.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/decoration_manager.h b/source/opt/decoration_manager.h
index 3becd22f..4561bfa8 100644
--- a/source/opt/decoration_manager.h
+++ b/source/opt/decoration_manager.h
@@ -20,8 +20,8 @@
#include <unordered_set>
#include <vector>
-#include "instruction.h"
-#include "module.h"
+#include "source/opt/instruction.h"
+#include "source/opt/module.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/def_use_manager.cpp b/source/opt/def_use_manager.cpp
index c581e399..4e364938 100644
--- a/source/opt/def_use_manager.cpp
+++ b/source/opt/def_use_manager.cpp
@@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "def_use_manager.h"
+#include "source/opt/def_use_manager.h"
#include <iostream>
-#include "log.h"
-#include "reflect.h"
+#include "source/opt/log.h"
+#include "source/opt/reflect.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/def_use_manager.h b/source/opt/def_use_manager.h
index 3d23e24b..0499e82b 100644
--- a/source/opt/def_use_manager.h
+++ b/source/opt/def_use_manager.h
@@ -18,10 +18,11 @@
#include <list>
#include <set>
#include <unordered_map>
+#include <utility>
#include <vector>
-#include "instruction.h"
-#include "module.h"
+#include "source/opt/instruction.h"
+#include "source/opt/module.h"
#include "spirv-tools/libspirv.hpp"
namespace spvtools {
diff --git a/source/opt/dominator_analysis.cpp b/source/opt/dominator_analysis.cpp
index f045ee46..aef43e69 100644
--- a/source/opt/dominator_analysis.cpp
+++ b/source/opt/dominator_analysis.cpp
@@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "dominator_analysis.h"
+#include "source/opt/dominator_analysis.h"
#include <unordered_set>
-#include "ir_context.h"
+#include "source/opt/ir_context.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/dominator_analysis.h b/source/opt/dominator_analysis.h
index eb21d2c2..a94120a5 100644
--- a/source/opt/dominator_analysis.h
+++ b/source/opt/dominator_analysis.h
@@ -18,7 +18,7 @@
#include <cstdint>
#include <map>
-#include "dominator_tree.h"
+#include "source/opt/dominator_tree.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/dominator_tree.cpp b/source/opt/dominator_tree.cpp
index df3aae6d..fc600d24 100644
--- a/source/opt/dominator_tree.cpp
+++ b/source/opt/dominator_tree.cpp
@@ -16,9 +16,9 @@
#include <memory>
#include <set>
-#include "cfa.h"
-#include "dominator_tree.h"
-#include "ir_context.h"
+#include "source/cfa.h"
+#include "source/opt/dominator_tree.h"
+#include "source/opt/ir_context.h"
// Calculates the dominator or postdominator tree for a given function.
// 1 - Compute the successors and predecessors for each BasicBlock. We add a
diff --git a/source/opt/dominator_tree.h b/source/opt/dominator_tree.h
index 18582e8c..0024bc50 100644
--- a/source/opt/dominator_tree.h
+++ b/source/opt/dominator_tree.h
@@ -21,8 +21,8 @@
#include <utility>
#include <vector>
-#include "cfg.h"
-#include "tree_iterator.h"
+#include "source/opt/cfg.h"
+#include "source/opt/tree_iterator.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/eliminate_dead_constant_pass.cpp b/source/opt/eliminate_dead_constant_pass.cpp
index 28b84caf..d368bd14 100644
--- a/source/opt/eliminate_dead_constant_pass.cpp
+++ b/source/opt/eliminate_dead_constant_pass.cpp
@@ -12,16 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "eliminate_dead_constant_pass.h"
+#include "source/opt/eliminate_dead_constant_pass.h"
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
+#include <vector>
-#include "def_use_manager.h"
-#include "ir_context.h"
-#include "log.h"
-#include "reflect.h"
+#include "source/opt/def_use_manager.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/log.h"
+#include "source/opt/reflect.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/eliminate_dead_constant_pass.h b/source/opt/eliminate_dead_constant_pass.h
index 4303295e..01692dbf 100644
--- a/source/opt/eliminate_dead_constant_pass.h
+++ b/source/opt/eliminate_dead_constant_pass.h
@@ -15,9 +15,9 @@
#ifndef SOURCE_OPT_ELIMINATE_DEAD_CONSTANT_PASS_H_
#define SOURCE_OPT_ELIMINATE_DEAD_CONSTANT_PASS_H_
-#include "ir_context.h"
-#include "module.h"
-#include "pass.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/module.h"
+#include "source/opt/pass.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/eliminate_dead_functions_pass.cpp b/source/opt/eliminate_dead_functions_pass.cpp
index 383c267a..5be983a5 100644
--- a/source/opt/eliminate_dead_functions_pass.cpp
+++ b/source/opt/eliminate_dead_functions_pass.cpp
@@ -12,11 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "eliminate_dead_functions_pass.h"
-#include "ir_context.h"
+#include "source/opt/eliminate_dead_functions_pass.h"
#include <unordered_set>
+#include "source/opt/ir_context.h"
+
namespace spvtools {
namespace opt {
diff --git a/source/opt/eliminate_dead_functions_pass.h b/source/opt/eliminate_dead_functions_pass.h
index 3967cedb..165e9a6b 100644
--- a/source/opt/eliminate_dead_functions_pass.h
+++ b/source/opt/eliminate_dead_functions_pass.h
@@ -15,10 +15,10 @@
#ifndef SOURCE_OPT_ELIMINATE_DEAD_FUNCTIONS_PASS_H_
#define SOURCE_OPT_ELIMINATE_DEAD_FUNCTIONS_PASS_H_
-#include "def_use_manager.h"
-#include "function.h"
-#include "mem_pass.h"
-#include "module.h"
+#include "source/opt/def_use_manager.h"
+#include "source/opt/function.h"
+#include "source/opt/mem_pass.h"
+#include "source/opt/module.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/feature_manager.cpp b/source/opt/feature_manager.cpp
index 15739f3a..b7fc16a5 100644
--- a/source/opt/feature_manager.cpp
+++ b/source/opt/feature_manager.cpp
@@ -12,11 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "feature_manager.h"
+#include "source/opt/feature_manager.h"
+
#include <queue>
#include <stack>
+#include <string>
-#include "enum_string_mapping.h"
+#include "source/enum_string_mapping.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/feature_manager.h b/source/opt/feature_manager.h
index 22828470..80b2cccf 100644
--- a/source/opt/feature_manager.h
+++ b/source/opt/feature_manager.h
@@ -15,9 +15,9 @@
#ifndef SOURCE_OPT_FEATURE_MANAGER_H_
#define SOURCE_OPT_FEATURE_MANAGER_H_
-#include "assembly_grammar.h"
-#include "extensions.h"
-#include "module.h"
+#include "source/assembly_grammar.h"
+#include "source/extensions.h"
+#include "source/opt/module.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/flatten_decoration_pass.cpp b/source/opt/flatten_decoration_pass.cpp
index 74c25fcb..f4de9116 100644
--- a/source/opt/flatten_decoration_pass.cpp
+++ b/source/opt/flatten_decoration_pass.cpp
@@ -12,14 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "flatten_decoration_pass.h"
-#include "ir_context.h"
+#include "source/opt/flatten_decoration_pass.h"
#include <cassert>
+#include <memory>
#include <unordered_map>
#include <unordered_set>
+#include <utility>
#include <vector>
+#include "source/opt/ir_context.h"
+
namespace spvtools {
namespace opt {
diff --git a/source/opt/flatten_decoration_pass.h b/source/opt/flatten_decoration_pass.h
index 541dabe8..c59821dc 100644
--- a/source/opt/flatten_decoration_pass.h
+++ b/source/opt/flatten_decoration_pass.h
@@ -15,9 +15,9 @@
#ifndef SOURCE_OPT_FLATTEN_DECORATION_PASS_H_
#define SOURCE_OPT_FLATTEN_DECORATION_PASS_H_
-#include "ir_context.h"
-#include "module.h"
-#include "pass.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/module.h"
+#include "source/opt/pass.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/fold.cpp b/source/opt/fold.cpp
index 20071383..09d7e512 100644
--- a/source/opt/fold.cpp
+++ b/source/opt/fold.cpp
@@ -12,17 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "fold.h"
+#include "source/opt/fold.h"
#include <cassert>
#include <cstdint>
#include <vector>
-#include "const_folding_rules.h"
-#include "def_use_manager.h"
-#include "folding_rules.h"
-#include "ir_builder.h"
-#include "ir_context.h"
+#include "source/opt/const_folding_rules.h"
+#include "source/opt/def_use_manager.h"
+#include "source/opt/folding_rules.h"
+#include "source/opt/ir_builder.h"
+#include "source/opt/ir_context.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/fold.h b/source/opt/fold.h
index bb88c0f0..0dc7c0eb 100644
--- a/source/opt/fold.h
+++ b/source/opt/fold.h
@@ -18,10 +18,10 @@
#include <cstdint>
#include <vector>
-#include "const_folding_rules.h"
-#include "constants.h"
-#include "def_use_manager.h"
-#include "folding_rules.h"
+#include "source/opt/const_folding_rules.h"
+#include "source/opt/constants.h"
+#include "source/opt/def_use_manager.h"
+#include "source/opt/folding_rules.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/fold_spec_constant_op_and_composite_pass.cpp b/source/opt/fold_spec_constant_op_and_composite_pass.cpp
index 3f394e74..4692d150 100644
--- a/source/opt/fold_spec_constant_op_and_composite_pass.cpp
+++ b/source/opt/fold_spec_constant_op_and_composite_pass.cpp
@@ -12,16 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "fold_spec_constant_op_and_composite_pass.h"
+#include "source/opt/fold_spec_constant_op_and_composite_pass.h"
#include <algorithm>
#include <initializer_list>
#include <tuple>
-#include "constants.h"
-#include "fold.h"
-#include "ir_context.h"
-#include "make_unique.h"
+#include "source/opt/constants.h"
+#include "source/opt/fold.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/make_unique.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/fold_spec_constant_op_and_composite_pass.h b/source/opt/fold_spec_constant_op_and_composite_pass.h
index efc959c3..16271251 100644
--- a/source/opt/fold_spec_constant_op_and_composite_pass.h
+++ b/source/opt/fold_spec_constant_op_and_composite_pass.h
@@ -19,12 +19,12 @@
#include <unordered_map>
#include <vector>
-#include "constants.h"
-#include "def_use_manager.h"
-#include "ir_context.h"
-#include "module.h"
-#include "pass.h"
-#include "type_manager.h"
+#include "source/opt/constants.h"
+#include "source/opt/def_use_manager.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/module.h"
+#include "source/opt/pass.h"
+#include "source/opt/type_manager.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/folding_rules.cpp b/source/opt/folding_rules.cpp
index 7faa3610..c64cedfb 100644
--- a/source/opt/folding_rules.cpp
+++ b/source/opt/folding_rules.cpp
@@ -12,12 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "folding_rules.h"
+#include "source/opt/folding_rules.h"
#include <limits>
+#include <memory>
+#include <utility>
-#include "ir_context.h"
-#include "latest_version_glsl_std_450_header.h"
+#include "source/latest_version_glsl_std_450_header.h"
+#include "source/opt/ir_context.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/folding_rules.h b/source/opt/folding_rules.h
index 9c19dbb5..33fdbffe 100644
--- a/source/opt/folding_rules.h
+++ b/source/opt/folding_rules.h
@@ -16,9 +16,10 @@
#define SOURCE_OPT_FOLDING_RULES_H_
#include <cstdint>
+#include <unordered_map>
#include <vector>
-#include "constants.h"
+#include "source/opt/constants.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/freeze_spec_constant_value_pass.cpp b/source/opt/freeze_spec_constant_value_pass.cpp
index 60de4b2b..10e98fd8 100644
--- a/source/opt/freeze_spec_constant_value_pass.cpp
+++ b/source/opt/freeze_spec_constant_value_pass.cpp
@@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "freeze_spec_constant_value_pass.h"
-#include "ir_context.h"
+#include "source/opt/freeze_spec_constant_value_pass.h"
+#include "source/opt/ir_context.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/freeze_spec_constant_value_pass.h b/source/opt/freeze_spec_constant_value_pass.h
index 308adab3..0663adf4 100644
--- a/source/opt/freeze_spec_constant_value_pass.h
+++ b/source/opt/freeze_spec_constant_value_pass.h
@@ -15,9 +15,9 @@
#ifndef SOURCE_OPT_FREEZE_SPEC_CONSTANT_VALUE_PASS_H_
#define SOURCE_OPT_FREEZE_SPEC_CONSTANT_VALUE_PASS_H_
-#include "ir_context.h"
-#include "module.h"
-#include "pass.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/module.h"
+#include "source/opt/pass.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/function.cpp b/source/opt/function.cpp
index 0fbf1e9f..c6894c68 100644
--- a/source/opt/function.cpp
+++ b/source/opt/function.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "function.h"
+#include "source/opt/function.h"
#include <ostream>
#include <sstream>
diff --git a/source/opt/function.h b/source/opt/function.h
index da5ee3ea..4dc5d25a 100644
--- a/source/opt/function.h
+++ b/source/opt/function.h
@@ -18,12 +18,13 @@
#include <algorithm>
#include <functional>
#include <memory>
+#include <string>
#include <utility>
#include <vector>
-#include "basic_block.h"
-#include "instruction.h"
-#include "iterator.h"
+#include "source/opt/basic_block.h"
+#include "source/opt/instruction.h"
+#include "source/opt/iterator.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/if_conversion.cpp b/source/opt/if_conversion.cpp
index 2e599519..7a3717f9 100644
--- a/source/opt/if_conversion.cpp
+++ b/source/opt/if_conversion.cpp
@@ -12,9 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "if_conversion.h"
+#include "source/opt/if_conversion.h"
-#include "value_number_table.h"
+#include <memory>
+#include <vector>
+
+#include "source/opt/value_number_table.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/if_conversion.h b/source/opt/if_conversion.h
index 30ad48b1..609bdf39 100644
--- a/source/opt/if_conversion.h
+++ b/source/opt/if_conversion.h
@@ -15,10 +15,10 @@
#ifndef SOURCE_OPT_IF_CONVERSION_H_
#define SOURCE_OPT_IF_CONVERSION_H_
-#include "basic_block.h"
-#include "ir_builder.h"
-#include "pass.h"
-#include "types.h"
+#include "source/opt/basic_block.h"
+#include "source/opt/ir_builder.h"
+#include "source/opt/pass.h"
+#include "source/opt/types.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/inline_exhaustive_pass.cpp b/source/opt/inline_exhaustive_pass.cpp
index a5399f7e..5714cd86 100644
--- a/source/opt/inline_exhaustive_pass.cpp
+++ b/source/opt/inline_exhaustive_pass.cpp
@@ -14,7 +14,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "inline_exhaustive_pass.h"
+#include "source/opt/inline_exhaustive_pass.h"
+
+#include <utility>
namespace spvtools {
namespace opt {
diff --git a/source/opt/inline_exhaustive_pass.h b/source/opt/inline_exhaustive_pass.h
index 87ebd7a6..103e091e 100644
--- a/source/opt/inline_exhaustive_pass.h
+++ b/source/opt/inline_exhaustive_pass.h
@@ -23,9 +23,9 @@
#include <unordered_map>
#include <vector>
-#include "def_use_manager.h"
-#include "inline_pass.h"
-#include "module.h"
+#include "source/opt/def_use_manager.h"
+#include "source/opt/inline_pass.h"
+#include "source/opt/module.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/inline_opaque_pass.cpp b/source/opt/inline_opaque_pass.cpp
index 03d74a9f..c2c3719f 100644
--- a/source/opt/inline_opaque_pass.cpp
+++ b/source/opt/inline_opaque_pass.cpp
@@ -14,11 +14,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "inline_opaque_pass.h"
+#include "source/opt/inline_opaque_pass.h"
+
+#include <utility>
namespace spvtools {
namespace opt {
-
namespace {
const uint32_t kTypePointerTypeIdInIdx = 1;
diff --git a/source/opt/inline_opaque_pass.h b/source/opt/inline_opaque_pass.h
index 1c36aaf1..aad43fd6 100644
--- a/source/opt/inline_opaque_pass.h
+++ b/source/opt/inline_opaque_pass.h
@@ -23,9 +23,9 @@
#include <unordered_map>
#include <vector>
-#include "def_use_manager.h"
-#include "inline_pass.h"
-#include "module.h"
+#include "source/opt/def_use_manager.h"
+#include "source/opt/inline_pass.h"
+#include "source/opt/module.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/inline_pass.cpp b/source/opt/inline_pass.cpp
index 665f3a7b..6db027cc 100644
--- a/source/opt/inline_pass.cpp
+++ b/source/opt/inline_pass.cpp
@@ -14,9 +14,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "inline_pass.h"
+#include "source/opt/inline_pass.h"
-#include "cfa.h"
+#include <unordered_set>
+#include <utility>
+
+#include "source/cfa.h"
// Indices of operands in SPIR-V instructions
diff --git a/source/opt/inline_pass.h b/source/opt/inline_pass.h
index fedfc433..55369c98 100644
--- a/source/opt/inline_pass.h
+++ b/source/opt/inline_pass.h
@@ -20,12 +20,13 @@
#include <algorithm>
#include <list>
#include <memory>
+#include <set>
#include <unordered_map>
#include <vector>
-#include "decoration_manager.h"
-#include "module.h"
-#include "pass.h"
+#include "source/opt/decoration_manager.h"
+#include "source/opt/module.h"
+#include "source/opt/pass.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/instruction.cpp b/source/opt/instruction.cpp
index ea75657f..4cfa41d8 100644
--- a/source/opt/instruction.cpp
+++ b/source/opt/instruction.cpp
@@ -12,14 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "instruction.h"
+#include "source/opt/instruction.h"
#include <initializer_list>
-#include "disassemble.h"
-#include "fold.h"
-#include "ir_context.h"
-#include "reflect.h"
+#include "source/disassemble.h"
+#include "source/opt/fold.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/reflect.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/instruction.h b/source/opt/instruction.h
index 6c492d45..2533ba27 100644
--- a/source/opt/instruction.h
+++ b/source/opt/instruction.h
@@ -17,17 +17,19 @@
#include <cassert>
#include <functional>
+#include <memory>
+#include <string>
#include <utility>
#include <vector>
-#include "opcode.h"
-#include "operand.h"
-#include "util/ilist_node.h"
-#include "util/small_vector.h"
+#include "source/opcode.h"
+#include "source/operand.h"
+#include "source/util/ilist_node.h"
+#include "source/util/small_vector.h"
-#include "latest_version_glsl_std_450_header.h"
-#include "latest_version_spirv_header.h"
-#include "reflect.h"
+#include "source/latest_version_glsl_std_450_header.h"
+#include "source/latest_version_spirv_header.h"
+#include "source/opt/reflect.h"
#include "spirv-tools/libspirv.h"
namespace spvtools {
diff --git a/source/opt/instruction_list.cpp b/source/opt/instruction_list.cpp
index dfaaba4d..385a136e 100644
--- a/source/opt/instruction_list.cpp
+++ b/source/opt/instruction_list.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "instruction_list.h"
+#include "source/opt/instruction_list.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/instruction_list.h b/source/opt/instruction_list.h
index 6ea70647..ea1cc7c4 100644
--- a/source/opt/instruction_list.h
+++ b/source/opt/instruction_list.h
@@ -18,14 +18,14 @@
#include <cassert>
#include <functional>
+#include <memory>
#include <utility>
#include <vector>
-#include "instruction.h"
-#include "operand.h"
-#include "util/ilist.h"
-
-#include "latest_version_spirv_header.h"
+#include "source/latest_version_spirv_header.h"
+#include "source/operand.h"
+#include "source/opt/instruction.h"
+#include "source/util/ilist.h"
#include "spirv-tools/libspirv.h"
namespace spvtools {
diff --git a/source/opt/ir_builder.h b/source/opt/ir_builder.h
index 46f2e86d..2dab76e5 100644
--- a/source/opt/ir_builder.h
+++ b/source/opt/ir_builder.h
@@ -15,10 +15,15 @@
#ifndef SOURCE_OPT_IR_BUILDER_H_
#define SOURCE_OPT_IR_BUILDER_H_
-#include "opt/basic_block.h"
-#include "opt/constants.h"
-#include "opt/instruction.h"
-#include "opt/ir_context.h"
+#include <limits>
+#include <memory>
+#include <utility>
+#include <vector>
+
+#include "source/opt/basic_block.h"
+#include "source/opt/constants.h"
+#include "source/opt/instruction.h"
+#include "source/opt/ir_context.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/ir_context.cpp b/source/opt/ir_context.cpp
index ad0cad77..de007585 100644
--- a/source/opt/ir_context.cpp
+++ b/source/opt/ir_context.cpp
@@ -12,14 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "ir_context.h"
-#include "latest_version_glsl_std_450_header.h"
-#include "log.h"
-#include "mem_pass.h"
-#include "reflect.h"
+#include "source/opt/ir_context.h"
#include <cstring>
+#include "source/latest_version_glsl_std_450_header.h"
+#include "source/opt/log.h"
+#include "source/opt/mem_pass.h"
+#include "source/opt/reflect.h"
+
namespace spvtools {
namespace opt {
diff --git a/source/opt/ir_context.h b/source/opt/ir_context.h
index 29a3abfd..95b5db52 100644
--- a/source/opt/ir_context.h
+++ b/source/opt/ir_context.h
@@ -15,25 +15,30 @@
#ifndef SOURCE_OPT_IR_CONTEXT_H_
#define SOURCE_OPT_IR_CONTEXT_H_
-#include "assembly_grammar.h"
-#include "cfg.h"
-#include "constants.h"
-#include "decoration_manager.h"
-#include "def_use_manager.h"
-#include "dominator_analysis.h"
-#include "feature_manager.h"
-#include "fold.h"
-#include "loop_descriptor.h"
-#include "module.h"
-#include "register_pressure.h"
-#include "scalar_analysis.h"
-#include "type_manager.h"
-#include "value_number_table.h"
-
#include <algorithm>
#include <iostream>
#include <limits>
+#include <map>
+#include <memory>
+#include <unordered_map>
#include <unordered_set>
+#include <utility>
+#include <vector>
+
+#include "source/assembly_grammar.h"
+#include "source/opt/cfg.h"
+#include "source/opt/constants.h"
+#include "source/opt/decoration_manager.h"
+#include "source/opt/def_use_manager.h"
+#include "source/opt/dominator_analysis.h"
+#include "source/opt/feature_manager.h"
+#include "source/opt/fold.h"
+#include "source/opt/loop_descriptor.h"
+#include "source/opt/module.h"
+#include "source/opt/register_pressure.h"
+#include "source/opt/scalar_analysis.h"
+#include "source/opt/type_manager.h"
+#include "source/opt/value_number_table.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/ir_loader.cpp b/source/opt/ir_loader.cpp
index b12ebbe8..3d7412d8 100644
--- a/source/opt/ir_loader.cpp
+++ b/source/opt/ir_loader.cpp
@@ -12,10 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "ir_loader.h"
+#include "source/opt/ir_loader.h"
-#include "log.h"
-#include "reflect.h"
+#include <utility>
+
+#include "source/opt/log.h"
+#include "source/opt/reflect.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/ir_loader.h b/source/opt/ir_loader.h
index 45f5e6f2..940d7b0d 100644
--- a/source/opt/ir_loader.h
+++ b/source/opt/ir_loader.h
@@ -16,10 +16,12 @@
#define SOURCE_OPT_IR_LOADER_H_
#include <memory>
+#include <string>
+#include <vector>
-#include "basic_block.h"
-#include "instruction.h"
-#include "module.h"
+#include "source/opt/basic_block.h"
+#include "source/opt/instruction.h"
+#include "source/opt/module.h"
#include "spirv-tools/libspirv.hpp"
namespace spvtools {
diff --git a/source/opt/iterator.h b/source/opt/iterator.h
index 326b6dcc..444d457c 100644
--- a/source/opt/iterator.h
+++ b/source/opt/iterator.h
@@ -19,6 +19,7 @@
#include <iterator>
#include <memory>
#include <type_traits>
+#include <utility>
#include <vector>
namespace spvtools {
diff --git a/source/opt/licm_pass.cpp b/source/opt/licm_pass.cpp
index 84871138..d8256679 100644
--- a/source/opt/licm_pass.cpp
+++ b/source/opt/licm_pass.cpp
@@ -12,13 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "opt/licm_pass.h"
-#include "opt/module.h"
-#include "opt/pass.h"
+#include "source/opt/licm_pass.h"
#include <queue>
#include <utility>
+#include "source/opt/module.h"
+#include "source/opt/pass.h"
+
namespace spvtools {
namespace opt {
diff --git a/source/opt/licm_pass.h b/source/opt/licm_pass.h
index c7d6bc6e..a1745004 100644
--- a/source/opt/licm_pass.h
+++ b/source/opt/licm_pass.h
@@ -15,12 +15,13 @@
#ifndef SOURCE_OPT_LICM_PASS_H_
#define SOURCE_OPT_LICM_PASS_H_
-#include "opt/basic_block.h"
-#include "opt/instruction.h"
-#include "opt/loop_descriptor.h"
-#include "opt/pass.h"
-
#include <queue>
+#include <vector>
+
+#include "source/opt/basic_block.h"
+#include "source/opt/instruction.h"
+#include "source/opt/loop_descriptor.h"
+#include "source/opt/pass.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/local_access_chain_convert_pass.cpp b/source/opt/local_access_chain_convert_pass.cpp
index 26108a72..20e1030b 100644
--- a/source/opt/local_access_chain_convert_pass.cpp
+++ b/source/opt/local_access_chain_convert_pass.cpp
@@ -14,10 +14,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "local_access_chain_convert_pass.h"
+#include "source/opt/local_access_chain_convert_pass.h"
-#include "ir_context.h"
-#include "iterator.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/iterator.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/local_access_chain_convert_pass.h b/source/opt/local_access_chain_convert_pass.h
index 656bad8c..fc593616 100644
--- a/source/opt/local_access_chain_convert_pass.h
+++ b/source/opt/local_access_chain_convert_pass.h
@@ -19,15 +19,18 @@
#include <algorithm>
#include <map>
+#include <memory>
#include <queue>
+#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
+#include <vector>
-#include "basic_block.h"
-#include "def_use_manager.h"
-#include "mem_pass.h"
-#include "module.h"
+#include "source/opt/basic_block.h"
+#include "source/opt/def_use_manager.h"
+#include "source/opt/mem_pass.h"
+#include "source/opt/module.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/local_redundancy_elimination.cpp b/source/opt/local_redundancy_elimination.cpp
index 85c1a083..9539e655 100644
--- a/source/opt/local_redundancy_elimination.cpp
+++ b/source/opt/local_redundancy_elimination.cpp
@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "local_redundancy_elimination.h"
+#include "source/opt/local_redundancy_elimination.h"
-#include "value_number_table.h"
+#include "source/opt/value_number_table.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/local_redundancy_elimination.h b/source/opt/local_redundancy_elimination.h
index e822da34..9f55c8bf 100644
--- a/source/opt/local_redundancy_elimination.h
+++ b/source/opt/local_redundancy_elimination.h
@@ -15,9 +15,11 @@
#ifndef SOURCE_OPT_LOCAL_REDUNDANCY_ELIMINATION_H_
#define SOURCE_OPT_LOCAL_REDUNDANCY_ELIMINATION_H_
-#include "ir_context.h"
-#include "pass.h"
-#include "value_number_table.h"
+#include <map>
+
+#include "source/opt/ir_context.h"
+#include "source/opt/pass.h"
+#include "source/opt/value_number_table.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/local_single_block_elim_pass.cpp b/source/opt/local_single_block_elim_pass.cpp
index 5a2ec8cd..19dde6a1 100644
--- a/source/opt/local_single_block_elim_pass.cpp
+++ b/source/opt/local_single_block_elim_pass.cpp
@@ -14,13 +14,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "local_single_block_elim_pass.h"
+#include "source/opt/local_single_block_elim_pass.h"
-#include "iterator.h"
+#include <vector>
+
+#include "source/opt/iterator.h"
namespace spvtools {
namespace opt {
-
namespace {
const uint32_t kStoreValIdInIdx = 1;
diff --git a/source/opt/local_single_block_elim_pass.h b/source/opt/local_single_block_elim_pass.h
index 2f75f200..3dead983 100644
--- a/source/opt/local_single_block_elim_pass.h
+++ b/source/opt/local_single_block_elim_pass.h
@@ -20,14 +20,15 @@
#include <algorithm>
#include <map>
#include <queue>
+#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
-#include "basic_block.h"
-#include "def_use_manager.h"
-#include "mem_pass.h"
-#include "module.h"
+#include "source/opt/basic_block.h"
+#include "source/opt/def_use_manager.h"
+#include "source/opt/mem_pass.h"
+#include "source/opt/module.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/local_single_store_elim_pass.cpp b/source/opt/local_single_store_elim_pass.cpp
index 66c1505e..4c837fc7 100644
--- a/source/opt/local_single_store_elim_pass.cpp
+++ b/source/opt/local_single_store_elim_pass.cpp
@@ -14,11 +14,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "local_single_store_elim_pass.h"
+#include "source/opt/local_single_store_elim_pass.h"
-#include "cfa.h"
-#include "iterator.h"
-#include "latest_version_glsl_std_450_header.h"
+#include "source/cfa.h"
+#include "source/latest_version_glsl_std_450_header.h"
+#include "source/opt/iterator.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/local_single_store_elim_pass.h b/source/opt/local_single_store_elim_pass.h
index 8f831172..d3d64b82 100644
--- a/source/opt/local_single_store_elim_pass.h
+++ b/source/opt/local_single_store_elim_pass.h
@@ -20,14 +20,16 @@
#include <algorithm>
#include <map>
#include <queue>
+#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
+#include <vector>
-#include "basic_block.h"
-#include "def_use_manager.h"
-#include "mem_pass.h"
-#include "module.h"
+#include "source/opt/basic_block.h"
+#include "source/opt/def_use_manager.h"
+#include "source/opt/mem_pass.h"
+#include "source/opt/module.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/local_ssa_elim_pass.cpp b/source/opt/local_ssa_elim_pass.cpp
index 872d26b3..ec7326ed 100644
--- a/source/opt/local_ssa_elim_pass.cpp
+++ b/source/opt/local_ssa_elim_pass.cpp
@@ -14,11 +14,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "local_ssa_elim_pass.h"
+#include "source/opt/local_ssa_elim_pass.h"
-#include "cfa.h"
-#include "iterator.h"
-#include "ssa_rewrite_pass.h"
+#include "source/cfa.h"
+#include "source/opt/iterator.h"
+#include "source/opt/ssa_rewrite_pass.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/local_ssa_elim_pass.h b/source/opt/local_ssa_elim_pass.h
index 29e92ffa..63d3c33b 100644
--- a/source/opt/local_ssa_elim_pass.h
+++ b/source/opt/local_ssa_elim_pass.h
@@ -20,14 +20,16 @@
#include <algorithm>
#include <map>
#include <queue>
+#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
+#include <vector>
-#include "basic_block.h"
-#include "def_use_manager.h"
-#include "mem_pass.h"
-#include "module.h"
+#include "source/opt/basic_block.h"
+#include "source/opt/def_use_manager.h"
+#include "source/opt/mem_pass.h"
+#include "source/opt/module.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/loop_dependence.cpp b/source/opt/loop_dependence.cpp
index 82dbd1c0..d8de699b 100644
--- a/source/opt/loop_dependence.cpp
+++ b/source/opt/loop_dependence.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "opt/loop_dependence.h"
+#include "source/opt/loop_dependence.h"
#include <functional>
#include <memory>
@@ -21,9 +21,9 @@
#include <utility>
#include <vector>
-#include "opt/instruction.h"
-#include "opt/scalar_analysis.h"
-#include "opt/scalar_analysis_nodes.h"
+#include "source/opt/instruction.h"
+#include "source/opt/scalar_analysis.h"
+#include "source/opt/scalar_analysis_nodes.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/loop_dependence.h b/source/opt/loop_dependence.h
index 99324e82..582c8d0a 100644
--- a/source/opt/loop_dependence.h
+++ b/source/opt/loop_dependence.h
@@ -26,10 +26,10 @@
#include <utility>
#include <vector>
-#include "opt/instruction.h"
-#include "opt/ir_context.h"
-#include "opt/loop_descriptor.h"
-#include "opt/scalar_analysis.h"
+#include "source/opt/instruction.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/loop_descriptor.h"
+#include "source/opt/scalar_analysis.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/loop_dependence_helpers.cpp b/source/opt/loop_dependence_helpers.cpp
index 979d03a8..de27a0a7 100644
--- a/source/opt/loop_dependence_helpers.cpp
+++ b/source/opt/loop_dependence_helpers.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "opt/loop_dependence.h"
+#include "source/opt/loop_dependence.h"
#include <ostream>
#include <set>
@@ -21,10 +21,10 @@
#include <utility>
#include <vector>
-#include "opt/basic_block.h"
-#include "opt/instruction.h"
-#include "opt/scalar_analysis.h"
-#include "opt/scalar_analysis_nodes.h"
+#include "source/opt/basic_block.h"
+#include "source/opt/instruction.h"
+#include "source/opt/scalar_analysis.h"
+#include "source/opt/scalar_analysis_nodes.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/loop_descriptor.cpp b/source/opt/loop_descriptor.cpp
index ec05ba6b..656ea125 100644
--- a/source/opt/loop_descriptor.cpp
+++ b/source/opt/loop_descriptor.cpp
@@ -12,21 +12,24 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "opt/loop_descriptor.h"
+#include "source/opt/loop_descriptor.h"
+
#include <algorithm>
#include <iostream>
+#include <limits>
+#include <stack>
#include <type_traits>
#include <utility>
#include <vector>
-#include "constants.h"
-#include "opt/cfg.h"
-#include "opt/dominator_tree.h"
-#include "opt/ir_builder.h"
-#include "opt/ir_context.h"
-#include "opt/iterator.h"
-#include "opt/make_unique.h"
-#include "opt/tree_iterator.h"
+#include "source/opt/cfg.h"
+#include "source/opt/constants.h"
+#include "source/opt/dominator_tree.h"
+#include "source/opt/ir_builder.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/iterator.h"
+#include "source/opt/make_unique.h"
+#include "source/opt/tree_iterator.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/loop_descriptor.h b/source/opt/loop_descriptor.h
index 8e4979c4..45a175a0 100644
--- a/source/opt/loop_descriptor.h
+++ b/source/opt/loop_descriptor.h
@@ -21,12 +21,13 @@
#include <memory>
#include <unordered_map>
#include <unordered_set>
+#include <utility>
#include <vector>
-#include "opt/basic_block.h"
-#include "opt/dominator_analysis.h"
-#include "opt/module.h"
-#include "opt/tree_iterator.h"
+#include "source/opt/basic_block.h"
+#include "source/opt/dominator_analysis.h"
+#include "source/opt/module.h"
+#include "source/opt/tree_iterator.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/loop_fission.cpp b/source/opt/loop_fission.cpp
index 7657ad6a..0052406d 100644
--- a/source/opt/loop_fission.cpp
+++ b/source/opt/loop_fission.cpp
@@ -12,8 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "opt/loop_fission.h"
-#include "opt/register_pressure.h"
+#include "source/opt/loop_fission.h"
+
+#include <set>
+
+#include "source/opt/register_pressure.h"
// Implement loop fission with an optional parameter to split only
// if the register pressure in a given loop meets a certain criteria. This is
diff --git a/source/opt/loop_fission.h b/source/opt/loop_fission.h
index d7169752..ef886c96 100644
--- a/source/opt/loop_fission.h
+++ b/source/opt/loop_fission.h
@@ -21,12 +21,12 @@
#include <utility>
#include <vector>
-#include "cfg.h"
-#include "module.h"
-#include "opt/loop_dependence.h"
-#include "opt/loop_utils.h"
-#include "pass.h"
-#include "tree_iterator.h"
+#include "source/opt/cfg.h"
+#include "source/opt/loop_dependence.h"
+#include "source/opt/loop_utils.h"
+#include "source/opt/module.h"
+#include "source/opt/pass.h"
+#include "source/opt/tree_iterator.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/loop_fusion.cpp b/source/opt/loop_fusion.cpp
index 350b27b8..07d171a0 100644
--- a/source/opt/loop_fusion.cpp
+++ b/source/opt/loop_fusion.cpp
@@ -12,14 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "opt/loop_fusion.h"
+#include "source/opt/loop_fusion.h"
#include <algorithm>
#include <vector>
-#include "opt/ir_context.h"
-#include "opt/loop_dependence.h"
-#include "opt/loop_descriptor.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/loop_dependence.h"
+#include "source/opt/loop_descriptor.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/loop_fusion.h b/source/opt/loop_fusion.h
index 343e023b..d61d6783 100644
--- a/source/opt/loop_fusion.h
+++ b/source/opt/loop_fusion.h
@@ -17,12 +17,13 @@
#include <map>
#include <set>
+#include <utility>
#include <vector>
-#include "opt/ir_context.h"
-#include "opt/loop_descriptor.h"
-#include "opt/loop_utils.h"
-#include "opt/scalar_analysis.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/loop_descriptor.h"
+#include "source/opt/loop_utils.h"
+#include "source/opt/scalar_analysis.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/loop_fusion_pass.cpp b/source/opt/loop_fusion_pass.cpp
index 46bfdc67..bd8444ae 100644
--- a/source/opt/loop_fusion_pass.cpp
+++ b/source/opt/loop_fusion_pass.cpp
@@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "opt/loop_fusion_pass.h"
+#include "source/opt/loop_fusion_pass.h"
-#include "opt/ir_context.h"
-#include "opt/loop_descriptor.h"
-#include "opt/loop_fusion.h"
-#include "opt/register_pressure.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/loop_descriptor.h"
+#include "source/opt/loop_fusion.h"
+#include "source/opt/register_pressure.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/loop_fusion_pass.h b/source/opt/loop_fusion_pass.h
index 99dd67d7..3a0be600 100644
--- a/source/opt/loop_fusion_pass.h
+++ b/source/opt/loop_fusion_pass.h
@@ -15,7 +15,7 @@
#ifndef SOURCE_OPT_LOOP_FUSION_PASS_H_
#define SOURCE_OPT_LOOP_FUSION_PASS_H_
-#include "opt/pass.h"
+#include "source/opt/pass.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/loop_peeling.cpp b/source/opt/loop_peeling.cpp
index 274aa66d..7d27480a 100644
--- a/source/opt/loop_peeling.cpp
+++ b/source/opt/loop_peeling.cpp
@@ -19,13 +19,13 @@
#include <unordered_set>
#include <vector>
-#include "ir_builder.h"
-#include "ir_context.h"
-#include "loop_descriptor.h"
-#include "loop_peeling.h"
-#include "loop_utils.h"
-#include "scalar_analysis.h"
-#include "scalar_analysis_nodes.h"
+#include "source/opt/ir_builder.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/loop_descriptor.h"
+#include "source/opt/loop_peeling.h"
+#include "source/opt/loop_utils.h"
+#include "source/opt/scalar_analysis.h"
+#include "source/opt/scalar_analysis_nodes.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/loop_peeling.h b/source/opt/loop_peeling.h
index 08af223b..413f896f 100644
--- a/source/opt/loop_peeling.h
+++ b/source/opt/loop_peeling.h
@@ -18,16 +18,17 @@
#include <algorithm>
#include <limits>
#include <memory>
+#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
-#include "opt/ir_context.h"
-#include "opt/loop_descriptor.h"
-#include "opt/loop_utils.h"
-#include "opt/pass.h"
-#include "opt/scalar_analysis.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/loop_descriptor.h"
+#include "source/opt/loop_utils.h"
+#include "source/opt/pass.h"
+#include "source/opt/scalar_analysis.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/loop_unroller.cpp b/source/opt/loop_unroller.cpp
index 16bde307..587615ed 100644
--- a/source/opt/loop_unroller.cpp
+++ b/source/opt/loop_unroller.cpp
@@ -12,12 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "opt/loop_unroller.h"
+#include "source/opt/loop_unroller.h"
+
+#include <limits>
#include <map>
#include <memory>
+#include <unordered_map>
#include <utility>
-#include "opt/ir_builder.h"
-#include "opt/loop_utils.h"
+#include <vector>
+
+#include "source/opt/ir_builder.h"
+#include "source/opt/loop_utils.h"
// Implements loop util unrolling functionality for fully and partially
// unrolling loops. Given a factor it will duplicate the loop that many times,
diff --git a/source/opt/loop_unroller.h b/source/opt/loop_unroller.h
index 080a1dfd..98f4d475 100644
--- a/source/opt/loop_unroller.h
+++ b/source/opt/loop_unroller.h
@@ -14,7 +14,8 @@
#ifndef SOURCE_OPT_LOOP_UNROLLER_H_
#define SOURCE_OPT_LOOP_UNROLLER_H_
-#include "opt/pass.h"
+
+#include "source/opt/pass.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/loop_unswitch_pass.cpp b/source/opt/loop_unswitch_pass.cpp
index b9eb61bc..8215cb69 100644
--- a/source/opt/loop_unswitch_pass.cpp
+++ b/source/opt/loop_unswitch_pass.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "loop_unswitch_pass.h"
+#include "source/opt/loop_unswitch_pass.h"
#include <functional>
#include <list>
@@ -23,16 +23,16 @@
#include <utility>
#include <vector>
-#include "basic_block.h"
-#include "dominator_tree.h"
-#include "fold.h"
-#include "function.h"
-#include "instruction.h"
-#include "ir_builder.h"
-#include "ir_context.h"
-#include "loop_descriptor.h"
+#include "source/opt/basic_block.h"
+#include "source/opt/dominator_tree.h"
+#include "source/opt/fold.h"
+#include "source/opt/function.h"
+#include "source/opt/instruction.h"
+#include "source/opt/ir_builder.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/loop_descriptor.h"
-#include "loop_utils.h"
+#include "source/opt/loop_utils.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/loop_unswitch_pass.h b/source/opt/loop_unswitch_pass.h
index 93fd1c0e..3ecdd611 100644
--- a/source/opt/loop_unswitch_pass.h
+++ b/source/opt/loop_unswitch_pass.h
@@ -15,8 +15,8 @@
#ifndef SOURCE_OPT_LOOP_UNSWITCH_PASS_H_
#define SOURCE_OPT_LOOP_UNSWITCH_PASS_H_
-#include "opt/loop_descriptor.h"
-#include "opt/pass.h"
+#include "source/opt/loop_descriptor.h"
+#include "source/opt/pass.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/loop_utils.cpp b/source/opt/loop_utils.cpp
index 96644b5d..482335f3 100644
--- a/source/opt/loop_utils.cpp
+++ b/source/opt/loop_utils.cpp
@@ -16,14 +16,15 @@
#include <memory>
#include <unordered_map>
#include <unordered_set>
+#include <utility>
#include <vector>
-#include "cfa.h"
-#include "opt/cfg.h"
-#include "opt/ir_builder.h"
-#include "opt/ir_context.h"
-#include "opt/loop_descriptor.h"
-#include "opt/loop_utils.h"
+#include "source/cfa.h"
+#include "source/opt/cfg.h"
+#include "source/opt/ir_builder.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/loop_descriptor.h"
+#include "source/opt/loop_utils.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/loop_utils.h b/source/opt/loop_utils.h
index 45cffd4b..a4e61900 100644
--- a/source/opt/loop_utils.h
+++ b/source/opt/loop_utils.h
@@ -14,11 +14,14 @@
#ifndef SOURCE_OPT_LOOP_UTILS_H_
#define SOURCE_OPT_LOOP_UTILS_H_
+
#include <list>
#include <memory>
+#include <unordered_map>
#include <vector>
-#include "opt/ir_context.h"
-#include "opt/loop_descriptor.h"
+
+#include "source/opt/ir_context.h"
+#include "source/opt/loop_descriptor.h"
namespace spvtools {
diff --git a/source/opt/mem_pass.cpp b/source/opt/mem_pass.cpp
index 41c29d64..c65e0493 100644
--- a/source/opt/mem_pass.cpp
+++ b/source/opt/mem_pass.cpp
@@ -14,13 +14,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "mem_pass.h"
+#include "source/opt/mem_pass.h"
-#include "basic_block.h"
-#include "cfa.h"
-#include "dominator_analysis.h"
-#include "ir_context.h"
-#include "iterator.h"
+#include <memory>
+#include <set>
+#include <vector>
+
+#include "source/cfa.h"
+#include "source/opt/basic_block.h"
+#include "source/opt/dominator_analysis.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/iterator.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/mem_pass.h b/source/opt/mem_pass.h
index 136da0c8..67ce26b1 100644
--- a/source/opt/mem_pass.h
+++ b/source/opt/mem_pass.h
@@ -25,11 +25,11 @@
#include <unordered_set>
#include <utility>
-#include "basic_block.h"
-#include "def_use_manager.h"
-#include "dominator_analysis.h"
-#include "module.h"
-#include "pass.h"
+#include "source/opt/basic_block.h"
+#include "source/opt/def_use_manager.h"
+#include "source/opt/dominator_analysis.h"
+#include "source/opt/module.h"
+#include "source/opt/pass.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/merge_return_pass.cpp b/source/opt/merge_return_pass.cpp
index 82ded202..c0323ff5 100644
--- a/source/opt/merge_return_pass.cpp
+++ b/source/opt/merge_return_pass.cpp
@@ -12,13 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "merge_return_pass.h"
+#include "source/opt/merge_return_pass.h"
-#include "instruction.h"
-#include "ir_builder.h"
-#include "ir_context.h"
-#include "make_unique.h"
-#include "reflect.h"
+#include <list>
+#include <memory>
+#include <utility>
+
+#include "source/opt/instruction.h"
+#include "source/opt/ir_builder.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/make_unique.h"
+#include "source/opt/reflect.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/merge_return_pass.h b/source/opt/merge_return_pass.h
index a98ef52c..0c7a3b48 100644
--- a/source/opt/merge_return_pass.h
+++ b/source/opt/merge_return_pass.h
@@ -15,13 +15,14 @@
#ifndef SOURCE_OPT_MERGE_RETURN_PASS_H_
#define SOURCE_OPT_MERGE_RETURN_PASS_H_
-#include "basic_block.h"
-#include "function.h"
-#include "mem_pass.h"
-
+#include <unordered_map>
#include <unordered_set>
#include <vector>
+#include "source/opt/basic_block.h"
+#include "source/opt/function.h"
+#include "source/opt/mem_pass.h"
+
namespace spvtools {
namespace opt {
diff --git a/source/opt/module.cpp b/source/opt/module.cpp
index 924d9837..6d024b5b 100644
--- a/source/opt/module.cpp
+++ b/source/opt/module.cpp
@@ -12,14 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "module.h"
+#include "source/opt/module.h"
#include <algorithm>
#include <cstring>
#include <ostream>
-#include "operand.h"
-#include "reflect.h"
+#include "source/operand.h"
+#include "source/opt/reflect.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/module.h b/source/opt/module.h
index 0c95bd83..eca8cc77 100644
--- a/source/opt/module.h
+++ b/source/opt/module.h
@@ -20,9 +20,9 @@
#include <utility>
#include <vector>
-#include "function.h"
-#include "instruction.h"
-#include "iterator.h"
+#include "source/opt/function.h"
+#include "source/opt/instruction.h"
+#include "source/opt/iterator.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/null_pass.h b/source/opt/null_pass.h
index b4376791..2b5974fb 100644
--- a/source/opt/null_pass.h
+++ b/source/opt/null_pass.h
@@ -15,8 +15,8 @@
#ifndef SOURCE_OPT_NULL_PASS_H_
#define SOURCE_OPT_NULL_PASS_H_
-#include "module.h"
-#include "pass.h"
+#include "source/opt/module.h"
+#include "source/opt/pass.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/optimizer.cpp b/source/opt/optimizer.cpp
index 60791ca0..f46306e8 100644
--- a/source/opt/optimizer.cpp
+++ b/source/opt/optimizer.cpp
@@ -14,13 +14,19 @@
#include "spirv-tools/optimizer.hpp"
-#include "build_module.h"
-#include "log.h"
-#include "make_unique.h"
-#include "pass_manager.h"
-#include "passes.h"
-#include "reduce_load_size.h"
-#include "simplification_pass.h"
+#include <memory>
+#include <string>
+#include <unordered_map>
+#include <utility>
+#include <vector>
+
+#include "source/opt/build_module.h"
+#include "source/opt/log.h"
+#include "source/opt/make_unique.h"
+#include "source/opt/pass_manager.h"
+#include "source/opt/passes.h"
+#include "source/opt/reduce_load_size.h"
+#include "source/opt/simplification_pass.h"
namespace spvtools {
diff --git a/source/opt/pass.cpp b/source/opt/pass.cpp
index c346ac44..4c4a232c 100644
--- a/source/opt/pass.cpp
+++ b/source/opt/pass.cpp
@@ -14,9 +14,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "pass.h"
+#include "source/opt/pass.h"
-#include "iterator.h"
+#include "source/opt/iterator.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/pass.h b/source/opt/pass.h
index 62fc15e8..df174509 100644
--- a/source/opt/pass.h
+++ b/source/opt/pass.h
@@ -22,10 +22,10 @@
#include <unordered_set>
#include <utility>
-#include "basic_block.h"
-#include "def_use_manager.h"
-#include "ir_context.h"
-#include "module.h"
+#include "source/opt/basic_block.h"
+#include "source/opt/def_use_manager.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/module.h"
#include "spirv-tools/libspirv.hpp"
namespace spvtools {
diff --git a/source/opt/pass_manager.cpp b/source/opt/pass_manager.cpp
index c02faeea..fa1e1d8a 100644
--- a/source/opt/pass_manager.cpp
+++ b/source/opt/pass_manager.cpp
@@ -12,14 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "pass_manager.h"
+#include "source/opt/pass_manager.h"
#include <iostream>
+#include <string>
#include <vector>
-#include "ir_context.h"
+#include "source/opt/ir_context.h"
+#include "source/util/timer.h"
#include "spirv-tools/libspirv.hpp"
-#include "util/timer.h"
namespace spvtools {
diff --git a/source/opt/pass_manager.h b/source/opt/pass_manager.h
index be576783..ed88aa17 100644
--- a/source/opt/pass_manager.h
+++ b/source/opt/pass_manager.h
@@ -17,13 +17,14 @@
#include <memory>
#include <ostream>
+#include <utility>
#include <vector>
-#include "log.h"
-#include "module.h"
-#include "pass.h"
+#include "source/opt/log.h"
+#include "source/opt/module.h"
+#include "source/opt/pass.h"
-#include "ir_context.h"
+#include "source/opt/ir_context.h"
#include "spirv-tools/libspirv.hpp"
namespace spvtools {
diff --git a/source/opt/passes.h b/source/opt/passes.h
index 221dfe57..42106c8f 100644
--- a/source/opt/passes.h
+++ b/source/opt/passes.h
@@ -17,50 +17,51 @@
// A single header to include all passes.
-#include "aggressive_dead_code_elim_pass.h"
-#include "block_merge_pass.h"
-#include "ccp_pass.h"
-#include "cfg_cleanup_pass.h"
-#include "combine_access_chains.h"
-#include "common_uniform_elim_pass.h"
-#include "compact_ids_pass.h"
-#include "copy_prop_arrays.h"
-#include "dead_branch_elim_pass.h"
-#include "dead_insert_elim_pass.h"
-#include "dead_variable_elimination.h"
-#include "eliminate_dead_constant_pass.h"
-#include "eliminate_dead_functions_pass.h"
-#include "flatten_decoration_pass.h"
-#include "fold_spec_constant_op_and_composite_pass.h"
-#include "freeze_spec_constant_value_pass.h"
-#include "if_conversion.h"
-#include "inline_exhaustive_pass.h"
-#include "inline_opaque_pass.h"
-#include "licm_pass.h"
-#include "local_access_chain_convert_pass.h"
-#include "local_redundancy_elimination.h"
-#include "local_single_block_elim_pass.h"
-#include "local_single_store_elim_pass.h"
-#include "local_ssa_elim_pass.h"
-#include "loop_fission.h"
-#include "loop_fusion_pass.h"
-#include "loop_peeling.h"
-#include "loop_unroller.h"
-#include "loop_unswitch_pass.h"
-#include "merge_return_pass.h"
-#include "null_pass.h"
-#include "private_to_local_pass.h"
-#include "reduce_load_size.h"
-#include "redundancy_elimination.h"
-#include "remove_duplicates_pass.h"
-#include "replace_invalid_opc.h"
-#include "scalar_replacement_pass.h"
-#include "set_spec_constant_default_value_pass.h"
-#include "ssa_rewrite_pass.h"
-#include "strength_reduction_pass.h"
-#include "strip_debug_info_pass.h"
-#include "strip_reflect_info_pass.h"
-#include "unify_const_pass.h"
-#include "vector_dce.h"
-#include "workaround1209.h"
+#include "source/opt/aggressive_dead_code_elim_pass.h"
+#include "source/opt/block_merge_pass.h"
+#include "source/opt/ccp_pass.h"
+#include "source/opt/cfg_cleanup_pass.h"
+#include "source/opt/combine_access_chains.h"
+#include "source/opt/common_uniform_elim_pass.h"
+#include "source/opt/compact_ids_pass.h"
+#include "source/opt/copy_prop_arrays.h"
+#include "source/opt/dead_branch_elim_pass.h"
+#include "source/opt/dead_insert_elim_pass.h"
+#include "source/opt/dead_variable_elimination.h"
+#include "source/opt/eliminate_dead_constant_pass.h"
+#include "source/opt/eliminate_dead_functions_pass.h"
+#include "source/opt/flatten_decoration_pass.h"
+#include "source/opt/fold_spec_constant_op_and_composite_pass.h"
+#include "source/opt/freeze_spec_constant_value_pass.h"
+#include "source/opt/if_conversion.h"
+#include "source/opt/inline_exhaustive_pass.h"
+#include "source/opt/inline_opaque_pass.h"
+#include "source/opt/licm_pass.h"
+#include "source/opt/local_access_chain_convert_pass.h"
+#include "source/opt/local_redundancy_elimination.h"
+#include "source/opt/local_single_block_elim_pass.h"
+#include "source/opt/local_single_store_elim_pass.h"
+#include "source/opt/local_ssa_elim_pass.h"
+#include "source/opt/loop_fission.h"
+#include "source/opt/loop_fusion_pass.h"
+#include "source/opt/loop_peeling.h"
+#include "source/opt/loop_unroller.h"
+#include "source/opt/loop_unswitch_pass.h"
+#include "source/opt/merge_return_pass.h"
+#include "source/opt/null_pass.h"
+#include "source/opt/private_to_local_pass.h"
+#include "source/opt/reduce_load_size.h"
+#include "source/opt/redundancy_elimination.h"
+#include "source/opt/remove_duplicates_pass.h"
+#include "source/opt/replace_invalid_opc.h"
+#include "source/opt/scalar_replacement_pass.h"
+#include "source/opt/set_spec_constant_default_value_pass.h"
+#include "source/opt/ssa_rewrite_pass.h"
+#include "source/opt/strength_reduction_pass.h"
+#include "source/opt/strip_debug_info_pass.h"
+#include "source/opt/strip_reflect_info_pass.h"
+#include "source/opt/unify_const_pass.h"
+#include "source/opt/vector_dce.h"
+#include "source/opt/workaround1209.h"
+
#endif // SOURCE_OPT_PASSES_H_
diff --git a/source/opt/private_to_local_pass.cpp b/source/opt/private_to_local_pass.cpp
index 9f498d51..02909a72 100644
--- a/source/opt/private_to_local_pass.cpp
+++ b/source/opt/private_to_local_pass.cpp
@@ -12,17 +12,22 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "private_to_local_pass.h"
+#include "source/opt/private_to_local_pass.h"
-#include "ir_context.h"
+#include <memory>
+#include <utility>
+#include <vector>
+#include "source/opt/ir_context.h"
+
+namespace spvtools {
+namespace opt {
namespace {
+
const uint32_t kVariableStorageClassInIdx = 0;
const uint32_t kSpvTypePointerTypeIdInIdx = 1;
-} // namespace
-namespace spvtools {
-namespace opt {
+} // namespace
Pass::Status PrivateToLocalPass::Process() {
bool modified = false;
diff --git a/source/opt/private_to_local_pass.h b/source/opt/private_to_local_pass.h
index 159d368b..f706e6e9 100644
--- a/source/opt/private_to_local_pass.h
+++ b/source/opt/private_to_local_pass.h
@@ -15,8 +15,8 @@
#ifndef SOURCE_OPT_PRIVATE_TO_LOCAL_PASS_H_
#define SOURCE_OPT_PRIVATE_TO_LOCAL_PASS_H_
-#include "ir_context.h"
-#include "pass.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/pass.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/propagator.cpp b/source/opt/propagator.cpp
index bfaa811b..6a1f1aaf 100644
--- a/source/opt/propagator.cpp
+++ b/source/opt/propagator.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "propagator.h"
+#include "source/opt/propagator.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/propagator.h b/source/opt/propagator.h
index 2dc2c507..ac7c0e7e 100644
--- a/source/opt/propagator.h
+++ b/source/opt/propagator.h
@@ -20,10 +20,11 @@
#include <set>
#include <unordered_map>
#include <unordered_set>
+#include <utility>
#include <vector>
-#include "ir_context.h"
-#include "module.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/module.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/reduce_load_size.cpp b/source/opt/reduce_load_size.cpp
index e82a9e28..b692c6b5 100644
--- a/source/opt/reduce_load_size.cpp
+++ b/source/opt/reduce_load_size.cpp
@@ -12,18 +12,23 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "reduce_load_size.h"
-#include <util/bit_vector.h>
+#include "source/opt/reduce_load_size.h"
-#include "instruction.h"
-#include "ir_builder.h"
-#include "ir_context.h"
+#include <set>
+#include <vector>
+
+#include "source/opt/instruction.h"
+#include "source/opt/ir_builder.h"
+#include "source/opt/ir_context.h"
+#include "source/util/bit_vector.h"
namespace {
+
const uint32_t kExtractCompositeIdInIdx = 0;
const uint32_t kVariableStorageClassInIdx = 0;
const uint32_t kLoadPointerInIdx = 0;
const double kThreshold = 0.9;
+
} // namespace
namespace spvtools {
diff --git a/source/opt/reduce_load_size.h b/source/opt/reduce_load_size.h
index 1071f1de..724a430b 100644
--- a/source/opt/reduce_load_size.h
+++ b/source/opt/reduce_load_size.h
@@ -15,9 +15,11 @@
#ifndef SOURCE_OPT_REDUCE_LOAD_SIZE_H_
#define SOURCE_OPT_REDUCE_LOAD_SIZE_H_
-#include "ir_context.h"
-#include "module.h"
-#include "pass.h"
+#include <unordered_map>
+
+#include "source/opt/ir_context.h"
+#include "source/opt/module.h"
+#include "source/opt/pass.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/redundancy_elimination.cpp b/source/opt/redundancy_elimination.cpp
index 294b84d5..362e54dc 100644
--- a/source/opt/redundancy_elimination.cpp
+++ b/source/opt/redundancy_elimination.cpp
@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "redundancy_elimination.h"
+#include "source/opt/redundancy_elimination.h"
-#include "value_number_table.h"
+#include "source/opt/value_number_table.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/redundancy_elimination.h b/source/opt/redundancy_elimination.h
index 5cd30fbc..91809b5d 100644
--- a/source/opt/redundancy_elimination.h
+++ b/source/opt/redundancy_elimination.h
@@ -15,10 +15,12 @@
#ifndef SOURCE_OPT_REDUNDANCY_ELIMINATION_H_
#define SOURCE_OPT_REDUNDANCY_ELIMINATION_H_
-#include "ir_context.h"
-#include "local_redundancy_elimination.h"
-#include "pass.h"
-#include "value_number_table.h"
+#include <map>
+
+#include "source/opt/ir_context.h"
+#include "source/opt/local_redundancy_elimination.h"
+#include "source/opt/pass.h"
+#include "source/opt/value_number_table.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/reflect.h b/source/opt/reflect.h
index 8dc11942..fb2de7b1 100644
--- a/source/opt/reflect.h
+++ b/source/opt/reflect.h
@@ -15,7 +15,7 @@
#ifndef SOURCE_OPT_REFLECT_H_
#define SOURCE_OPT_REFLECT_H_
-#include "latest_version_spirv_header.h"
+#include "source/latest_version_spirv_header.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/register_pressure.cpp b/source/opt/register_pressure.cpp
index 729755c2..34dac1d7 100644
--- a/source/opt/register_pressure.cpp
+++ b/source/opt/register_pressure.cpp
@@ -12,16 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "register_pressure.h"
+#include "source/opt/register_pressure.h"
+#include <algorithm>
#include <iterator>
-#include "cfg.h"
-#include "def_use_manager.h"
-#include "dominator_tree.h"
-#include "function.h"
-#include "ir_context.h"
-#include "iterator.h"
+#include "source/opt/cfg.h"
+#include "source/opt/def_use_manager.h"
+#include "source/opt/dominator_tree.h"
+#include "source/opt/function.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/iterator.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/register_pressure.h b/source/opt/register_pressure.h
index be83f008..cb3d2e27 100644
--- a/source/opt/register_pressure.h
+++ b/source/opt/register_pressure.h
@@ -20,8 +20,8 @@
#include <utility>
#include <vector>
-#include "function.h"
-#include "types.h"
+#include "source/opt/function.h"
+#include "source/opt/types.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/remove_duplicates_pass.cpp b/source/opt/remove_duplicates_pass.cpp
index bfbab4d6..a37e9df9 100644
--- a/source/opt/remove_duplicates_pass.cpp
+++ b/source/opt/remove_duplicates_pass.cpp
@@ -12,20 +12,20 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "remove_duplicates_pass.h"
-
-#include <cstring>
+#include "source/opt/remove_duplicates_pass.h"
#include <algorithm>
+#include <cstring>
#include <limits>
+#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
-#include "decoration_manager.h"
-#include "ir_context.h"
-#include "opcode.h"
-#include "reflect.h"
+#include "source/opcode.h"
+#include "source/opt/decoration_manager.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/reflect.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/remove_duplicates_pass.h b/source/opt/remove_duplicates_pass.h
index 08e6c13a..8554a987 100644
--- a/source/opt/remove_duplicates_pass.h
+++ b/source/opt/remove_duplicates_pass.h
@@ -16,12 +16,13 @@
#define SOURCE_OPT_REMOVE_DUPLICATES_PASS_H_
#include <unordered_map>
+#include <vector>
-#include "decoration_manager.h"
-#include "def_use_manager.h"
-#include "ir_context.h"
-#include "module.h"
-#include "pass.h"
+#include "source/opt/decoration_manager.h"
+#include "source/opt/def_use_manager.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/module.h"
+#include "source/opt/pass.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/replace_invalid_opc.cpp b/source/opt/replace_invalid_opc.cpp
index 711405fb..4e0f24f4 100644
--- a/source/opt/replace_invalid_opc.cpp
+++ b/source/opt/replace_invalid_opc.cpp
@@ -12,9 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "replace_invalid_opc.h"
+#include "source/opt/replace_invalid_opc.h"
#include <bitset>
+#include <vector>
namespace spvtools {
namespace opt {
diff --git a/source/opt/replace_invalid_opc.h b/source/opt/replace_invalid_opc.h
index ef5a2745..4d464058 100644
--- a/source/opt/replace_invalid_opc.h
+++ b/source/opt/replace_invalid_opc.h
@@ -15,7 +15,9 @@
#ifndef SOURCE_OPT_REPLACE_INVALID_OPC_H_
#define SOURCE_OPT_REPLACE_INVALID_OPC_H_
-#include "pass.h"
+#include <string>
+
+#include "source/opt/pass.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/scalar_analysis.cpp b/source/opt/scalar_analysis.cpp
index c124a3ff..38555e64 100644
--- a/source/opt/scalar_analysis.cpp
+++ b/source/opt/scalar_analysis.cpp
@@ -12,14 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "opt/scalar_analysis.h"
+#include "source/opt/scalar_analysis.h"
#include <algorithm>
#include <functional>
#include <string>
#include <utility>
-#include "opt/ir_context.h"
+#include "source/opt/ir_context.h"
// Transforms a given scalar operation instruction into a DAG representation.
//
diff --git a/source/opt/scalar_analysis.h b/source/opt/scalar_analysis.h
index f33f6128..fb6d631f 100644
--- a/source/opt/scalar_analysis.h
+++ b/source/opt/scalar_analysis.h
@@ -20,11 +20,12 @@
#include <map>
#include <memory>
#include <unordered_set>
+#include <utility>
#include <vector>
-#include "opt/basic_block.h"
-#include "opt/instruction.h"
-#include "opt/scalar_analysis_nodes.h"
+#include "source/opt/basic_block.h"
+#include "source/opt/instruction.h"
+#include "source/opt/scalar_analysis_nodes.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/scalar_analysis_nodes.h b/source/opt/scalar_analysis_nodes.h
index 59cd725b..450522ec 100644
--- a/source/opt/scalar_analysis_nodes.h
+++ b/source/opt/scalar_analysis_nodes.h
@@ -19,7 +19,8 @@
#include <memory>
#include <string>
#include <vector>
-#include "opt/tree_iterator.h"
+
+#include "source/opt/tree_iterator.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/scalar_analysis_simplification.cpp b/source/opt/scalar_analysis_simplification.cpp
index 58b08ea7..52f2d6ad 100644
--- a/source/opt/scalar_analysis_simplification.cpp
+++ b/source/opt/scalar_analysis_simplification.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "opt/scalar_analysis.h"
+#include "source/opt/scalar_analysis.h"
#include <functional>
#include <map>
diff --git a/source/opt/scalar_replacement_pass.cpp b/source/opt/scalar_replacement_pass.cpp
index b3e9c52c..c0ec1285 100644
--- a/source/opt/scalar_replacement_pass.cpp
+++ b/source/opt/scalar_replacement_pass.cpp
@@ -12,16 +12,18 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "scalar_replacement_pass.h"
-
-#include "enum_string_mapping.h"
-#include "extensions.h"
-#include "make_unique.h"
-#include "reflect.h"
-#include "types.h"
+#include "source/opt/scalar_replacement_pass.h"
+#include <algorithm>
#include <queue>
#include <tuple>
+#include <utility>
+
+#include "source/enum_string_mapping.h"
+#include "source/extensions.h"
+#include "source/opt/make_unique.h"
+#include "source/opt/reflect.h"
+#include "source/opt/types.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/scalar_replacement_pass.h b/source/opt/scalar_replacement_pass.h
index 143d5783..c89bbc40 100644
--- a/source/opt/scalar_replacement_pass.h
+++ b/source/opt/scalar_replacement_pass.h
@@ -16,12 +16,15 @@
#define SOURCE_OPT_SCALAR_REPLACEMENT_PASS_H_
#include <cstdio>
-
-#include "function.h"
-#include "pass.h"
-#include "type_manager.h"
-
+#include <memory>
#include <queue>
+#include <unordered_map>
+#include <unordered_set>
+#include <vector>
+
+#include "source/opt/function.h"
+#include "source/opt/pass.h"
+#include "source/opt/type_manager.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/set_spec_constant_default_value_pass.cpp b/source/opt/set_spec_constant_default_value_pass.cpp
index fe97582b..7927b605 100644
--- a/source/opt/set_spec_constant_default_value_pass.cpp
+++ b/source/opt/set_spec_constant_default_value_pass.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "set_spec_constant_default_value_pass.h"
+#include "source/opt/set_spec_constant_default_value_pass.h"
#include <algorithm>
#include <cctype>
@@ -20,13 +20,13 @@
#include <tuple>
#include <vector>
-#include "def_use_manager.h"
-#include "ir_context.h"
-#include "make_unique.h"
+#include "source/opt/def_use_manager.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/make_unique.h"
+#include "source/opt/type_manager.h"
+#include "source/opt/types.h"
+#include "source/util/parse_number.h"
#include "spirv-tools/libspirv.h"
-#include "type_manager.h"
-#include "types.h"
-#include "util/parse_number.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/set_spec_constant_default_value_pass.h b/source/opt/set_spec_constant_default_value_pass.h
index a1a6da48..8bd1787c 100644
--- a/source/opt/set_spec_constant_default_value_pass.h
+++ b/source/opt/set_spec_constant_default_value_pass.h
@@ -18,10 +18,12 @@
#include <memory>
#include <string>
#include <unordered_map>
+#include <utility>
+#include <vector>
-#include "ir_context.h"
-#include "module.h"
-#include "pass.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/module.h"
+#include "source/opt/pass.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/simplification_pass.cpp b/source/opt/simplification_pass.cpp
index 81ceb865..5fbafbdd 100644
--- a/source/opt/simplification_pass.cpp
+++ b/source/opt/simplification_pass.cpp
@@ -12,13 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "simplification_pass.h"
+#include "source/opt/simplification_pass.h"
#include <set>
#include <unordered_set>
#include <vector>
-#include "fold.h"
+#include "source/opt/fold.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/simplification_pass.h b/source/opt/simplification_pass.h
index 6997f7df..348c96a0 100644
--- a/source/opt/simplification_pass.h
+++ b/source/opt/simplification_pass.h
@@ -15,9 +15,9 @@
#ifndef SOURCE_OPT_SIMPLIFICATION_PASS_H_
#define SOURCE_OPT_SIMPLIFICATION_PASS_H_
-#include "function.h"
-#include "ir_context.h"
-#include "pass.h"
+#include "source/opt/function.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/pass.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/ssa_rewrite_pass.cpp b/source/opt/ssa_rewrite_pass.cpp
index 995b750c..8c3f6269 100644
--- a/source/opt/ssa_rewrite_pass.cpp
+++ b/source/opt/ssa_rewrite_pass.cpp
@@ -39,14 +39,16 @@
// some Phi instructions may be dead
// (https://en.wikipedia.org/wiki/Static_single_assignment_form).
-#include "ssa_rewrite_pass.h"
-#include "cfg.h"
-#include "make_unique.h"
-#include "mem_pass.h"
-#include "opcode.h"
+#include "source/opt/ssa_rewrite_pass.h"
+#include <memory>
#include <sstream>
+#include "source/opcode.h"
+#include "source/opt/cfg.h"
+#include "source/opt/make_unique.h"
+#include "source/opt/mem_pass.h"
+
// Debug logging (0: Off, 1-N: Verbosity level). Replace this with the
// implementation done for
// https://github.com/KhronosGroup/SPIRV-Tools/issues/1351
diff --git a/source/opt/ssa_rewrite_pass.h b/source/opt/ssa_rewrite_pass.h
index e7edbbac..c0373dc0 100644
--- a/source/opt/ssa_rewrite_pass.h
+++ b/source/opt/ssa_rewrite_pass.h
@@ -15,11 +15,16 @@
#ifndef SOURCE_OPT_SSA_REWRITE_PASS_H_
#define SOURCE_OPT_SSA_REWRITE_PASS_H_
-#include "basic_block.h"
-#include "ir_context.h"
-#include "mem_pass.h"
-
+#include <queue>
+#include <string>
#include <unordered_map>
+#include <unordered_set>
+#include <utility>
+#include <vector>
+
+#include "source/opt/basic_block.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/mem_pass.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/strength_reduction_pass.cpp b/source/opt/strength_reduction_pass.cpp
index fa4b3217..ab7c4eb8 100644
--- a/source/opt/strength_reduction_pass.cpp
+++ b/source/opt/strength_reduction_pass.cpp
@@ -12,18 +12,21 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "strength_reduction_pass.h"
+#include "source/opt/strength_reduction_pass.h"
#include <algorithm>
#include <cstdio>
#include <cstring>
+#include <memory>
#include <unordered_map>
#include <unordered_set>
+#include <utility>
+#include <vector>
-#include "def_use_manager.h"
-#include "ir_context.h"
-#include "log.h"
-#include "reflect.h"
+#include "source/opt/def_use_manager.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/log.h"
+#include "source/opt/reflect.h"
namespace {
// Count the number of trailing zeros in the binary representation of
diff --git a/source/opt/strength_reduction_pass.h b/source/opt/strength_reduction_pass.h
index d7218ebc..8dfeb307 100644
--- a/source/opt/strength_reduction_pass.h
+++ b/source/opt/strength_reduction_pass.h
@@ -15,10 +15,10 @@
#ifndef SOURCE_OPT_STRENGTH_REDUCTION_PASS_H_
#define SOURCE_OPT_STRENGTH_REDUCTION_PASS_H_
-#include "def_use_manager.h"
-#include "ir_context.h"
-#include "module.h"
-#include "pass.h"
+#include "source/opt/def_use_manager.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/module.h"
+#include "source/opt/pass.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/strip_debug_info_pass.cpp b/source/opt/strip_debug_info_pass.cpp
index c98a2274..5d9c5fec 100644
--- a/source/opt/strip_debug_info_pass.cpp
+++ b/source/opt/strip_debug_info_pass.cpp
@@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "strip_debug_info_pass.h"
-#include "ir_context.h"
+#include "source/opt/strip_debug_info_pass.h"
+#include "source/opt/ir_context.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/strip_debug_info_pass.h b/source/opt/strip_debug_info_pass.h
index 46373ccc..47a2cd40 100644
--- a/source/opt/strip_debug_info_pass.h
+++ b/source/opt/strip_debug_info_pass.h
@@ -15,9 +15,9 @@
#ifndef SOURCE_OPT_STRIP_DEBUG_INFO_PASS_H_
#define SOURCE_OPT_STRIP_DEBUG_INFO_PASS_H_
-#include "ir_context.h"
-#include "module.h"
-#include "pass.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/module.h"
+#include "source/opt/pass.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/strip_reflect_info_pass.cpp b/source/opt/strip_reflect_info_pass.cpp
index fab2e3d8..14ce31ff 100644
--- a/source/opt/strip_reflect_info_pass.cpp
+++ b/source/opt/strip_reflect_info_pass.cpp
@@ -12,12 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "strip_reflect_info_pass.h"
+#include "source/opt/strip_reflect_info_pass.h"
#include <cstring>
+#include <vector>
-#include "instruction.h"
-#include "ir_context.h"
+#include "source/opt/instruction.h"
+#include "source/opt/ir_context.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/strip_reflect_info_pass.h b/source/opt/strip_reflect_info_pass.h
index 1c0fa178..935a605e 100644
--- a/source/opt/strip_reflect_info_pass.h
+++ b/source/opt/strip_reflect_info_pass.h
@@ -15,9 +15,9 @@
#ifndef SOURCE_OPT_STRIP_REFLECT_INFO_PASS_H_
#define SOURCE_OPT_STRIP_REFLECT_INFO_PASS_H_
-#include "ir_context.h"
-#include "module.h"
-#include "pass.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/module.h"
+#include "source/opt/pass.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/type_manager.cpp b/source/opt/type_manager.cpp
index 7f615a28..c6352927 100644
--- a/source/opt/type_manager.cpp
+++ b/source/opt/type_manager.cpp
@@ -12,16 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "type_manager.h"
+#include "source/opt/type_manager.h"
+#include <algorithm>
#include <cassert>
#include <cstring>
#include <utility>
-#include "ir_context.h"
-#include "log.h"
-#include "make_unique.h"
-#include "reflect.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/log.h"
+#include "source/opt/make_unique.h"
+#include "source/opt/reflect.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/type_manager.h b/source/opt/type_manager.h
index 10292a7b..c44969e8 100644
--- a/source/opt/type_manager.h
+++ b/source/opt/type_manager.h
@@ -18,11 +18,12 @@
#include <memory>
#include <unordered_map>
#include <unordered_set>
+#include <utility>
#include <vector>
-#include "module.h"
+#include "source/opt/module.h"
+#include "source/opt/types.h"
#include "spirv-tools/libspirv.hpp"
-#include "types.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/types.cpp b/source/opt/types.cpp
index e5d90d09..6045ff2b 100644
--- a/source/opt/types.cpp
+++ b/source/opt/types.cpp
@@ -18,7 +18,7 @@
#include <sstream>
#include <unordered_set>
-#include "types.h"
+#include "source/opt/types.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/types.h b/source/opt/types.h
index d88df00f..625f342a 100644
--- a/source/opt/types.h
+++ b/source/opt/types.h
@@ -23,9 +23,10 @@
#include <string>
#include <unordered_map>
#include <unordered_set>
+#include <utility>
#include <vector>
-#include "latest_version_spirv_header.h"
+#include "source/latest_version_spirv_header.h"
#include "spirv-tools/libspirv.h"
namespace spvtools {
diff --git a/source/opt/unify_const_pass.cpp b/source/opt/unify_const_pass.cpp
index 83bd6c0f..c52f34ac 100644
--- a/source/opt/unify_const_pass.cpp
+++ b/source/opt/unify_const_pass.cpp
@@ -12,14 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "unify_const_pass.h"
+#include "source/opt/unify_const_pass.h"
+#include <memory>
#include <unordered_map>
#include <utility>
+#include <vector>
-#include "def_use_manager.h"
-#include "ir_context.h"
-#include "make_unique.h"
+#include "source/opt/def_use_manager.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/make_unique.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/unify_const_pass.h b/source/opt/unify_const_pass.h
index e35f9914..f2b7897c 100644
--- a/source/opt/unify_const_pass.h
+++ b/source/opt/unify_const_pass.h
@@ -15,9 +15,9 @@
#ifndef SOURCE_OPT_UNIFY_CONST_PASS_H_
#define SOURCE_OPT_UNIFY_CONST_PASS_H_
-#include "ir_context.h"
-#include "module.h"
-#include "pass.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/module.h"
+#include "source/opt/pass.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/value_number_table.cpp b/source/opt/value_number_table.cpp
index 165540f5..1bac63fa 100644
--- a/source/opt/value_number_table.cpp
+++ b/source/opt/value_number_table.cpp
@@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "value_number_table.h"
+#include "source/opt/value_number_table.h"
#include <algorithm>
-#include "cfg.h"
-#include "ir_context.h"
+#include "source/opt/cfg.h"
+#include "source/opt/ir_context.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/value_number_table.h b/source/opt/value_number_table.h
index 35dcaf72..39129ffa 100644
--- a/source/opt/value_number_table.h
+++ b/source/opt/value_number_table.h
@@ -17,7 +17,8 @@
#include <cstdint>
#include <unordered_map>
-#include "instruction.h"
+
+#include "source/opt/instruction.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/vector_dce.cpp b/source/opt/vector_dce.cpp
index 8738fccf..911242e0 100644
--- a/source/opt/vector_dce.cpp
+++ b/source/opt/vector_dce.cpp
@@ -12,16 +12,19 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "vector_dce.h"
+#include "source/opt/vector_dce.h"
+#include <utility>
+
+namespace spvtools {
+namespace opt {
namespace {
+
const uint32_t kExtractCompositeIdInIdx = 0;
const uint32_t kInsertObjectIdInIdx = 0;
const uint32_t kInsertCompositeIdInIdx = 1;
-} // namespace
-namespace spvtools {
-namespace opt {
+} // namespace
Pass::Status VectorDCE::Process() {
bool modified = false;
diff --git a/source/opt/vector_dce.h b/source/opt/vector_dce.h
index 960deb76..48886998 100644
--- a/source/opt/vector_dce.h
+++ b/source/opt/vector_dce.h
@@ -15,8 +15,11 @@
#ifndef SOURCE_OPT_VECTOR_DCE_H_
#define SOURCE_OPT_VECTOR_DCE_H_
-#include <util/bit_vector.h>
-#include "mem_pass.h"
+#include <unordered_map>
+#include <vector>
+
+#include "source/opt/mem_pass.h"
+#include "source/util/bit_vector.h"
namespace spvtools {
namespace opt {
diff --git a/source/opt/workaround1209.cpp b/source/opt/workaround1209.cpp
index fae08b83..d6e9d2cf 100644
--- a/source/opt/workaround1209.cpp
+++ b/source/opt/workaround1209.cpp
@@ -12,10 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "workaround1209.h"
+#include "source/opt/workaround1209.h"
#include <list>
+#include <memory>
#include <stack>
+#include <utility>
namespace spvtools {
namespace opt {
diff --git a/source/opt/workaround1209.h b/source/opt/workaround1209.h
index 22d9f9c9..9a1f88d9 100644
--- a/source/opt/workaround1209.h
+++ b/source/opt/workaround1209.h
@@ -15,7 +15,7 @@
#ifndef SOURCE_OPT_WORKAROUND1209_H_
#define SOURCE_OPT_WORKAROUND1209_H_
-#include "pass.h"
+#include "source/opt/pass.h"
namespace spvtools {
namespace opt {
diff --git a/source/parsed_operand.cpp b/source/parsed_operand.cpp
index 3f10d822..3bb4dd01 100644
--- a/source/parsed_operand.cpp
+++ b/source/parsed_operand.cpp
@@ -14,10 +14,10 @@
// This file contains utility functions for spv_parsed_operand_t.
-#include "parsed_operand.h"
+#include "source/parsed_operand.h"
#include <cassert>
-#include "util/hex_float.h"
+#include "source/util/hex_float.h"
namespace spvtools {
diff --git a/source/parsed_operand.h b/source/parsed_operand.h
index 779677ef..bab86110 100644
--- a/source/parsed_operand.h
+++ b/source/parsed_operand.h
@@ -16,6 +16,7 @@
#define SOURCE_PARSED_OPERAND_H_
#include <ostream>
+
#include "spirv-tools/libspirv.h"
namespace spvtools {
diff --git a/source/print.cpp b/source/print.cpp
index f03c2d68..f75e2d45 100644
--- a/source/print.cpp
+++ b/source/print.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "print.h"
+#include "source/print.h"
#if defined(SPIRV_ANDROID) || defined(SPIRV_LINUX) || defined(SPIRV_MAC) || \
defined(SPIRV_FREEBSD)
diff --git a/source/spirv_constant.h b/source/spirv_constant.h
index d705ff2c..39771ccb 100644
--- a/source/spirv_constant.h
+++ b/source/spirv_constant.h
@@ -15,7 +15,7 @@
#ifndef SOURCE_SPIRV_CONSTANT_H_
#define SOURCE_SPIRV_CONSTANT_H_
-#include "latest_version_spirv_header.h"
+#include "source/latest_version_spirv_header.h"
#include "spirv-tools/libspirv.h"
// Version number macros.
diff --git a/source/spirv_definition.h b/source/spirv_definition.h
index 2513944c..63a4ef0d 100644
--- a/source/spirv_definition.h
+++ b/source/spirv_definition.h
@@ -17,7 +17,7 @@
#include <cstdint>
-#include "latest_version_spirv_header.h"
+#include "source/latest_version_spirv_header.h"
#define spvIsInBitfield(value, bitfield) ((value) == ((value)&bitfield))
diff --git a/source/spirv_endian.cpp b/source/spirv_endian.cpp
index 56eaac85..1d770917 100644
--- a/source/spirv_endian.cpp
+++ b/source/spirv_endian.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "spirv_endian.h"
+#include "source/spirv_endian.h"
#include <cstring>
diff --git a/source/spirv_stats.cpp b/source/spirv_stats.cpp
index 9720d550..bf4107a1 100644
--- a/source/spirv_stats.cpp
+++ b/source/spirv_stats.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "spirv_stats.h"
+#include "source/spirv_stats.h"
#include <cassert>
@@ -20,17 +20,17 @@
#include <memory>
#include <string>
-#include "diagnostic.h"
-#include "enum_string_mapping.h"
-#include "extensions.h"
-#include "id_descriptor.h"
-#include "instruction.h"
-#include "opcode.h"
-#include "operand.h"
+#include "source/diagnostic.h"
+#include "source/enum_string_mapping.h"
+#include "source/extensions.h"
+#include "source/id_descriptor.h"
+#include "source/instruction.h"
+#include "source/opcode.h"
+#include "source/operand.h"
+#include "source/val/instruction.h"
+#include "source/val/validate.h"
+#include "source/val/validation_state.h"
#include "spirv-tools/libspirv.h"
-#include "val/instruction.h"
-#include "val/validate.h"
-#include "val/validation_state.h"
namespace spvtools {
namespace {
diff --git a/source/spirv_stats.h b/source/spirv_stats.h
index fd661d4d..348bba16 100644
--- a/source/spirv_stats.h
+++ b/source/spirv_stats.h
@@ -18,6 +18,7 @@
#include <map>
#include <string>
#include <unordered_map>
+#include <utility>
#include <vector>
#include "spirv-tools/libspirv.hpp"
diff --git a/source/spirv_target_env.cpp b/source/spirv_target_env.cpp
index 3a8766d7..7a11630c 100644
--- a/source/spirv_target_env.cpp
+++ b/source/spirv_target_env.cpp
@@ -12,11 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include "source/spirv_target_env.h"
+
#include <cassert>
#include <cstring>
+#include "source/spirv_constant.h"
#include "spirv-tools/libspirv.h"
-#include "spirv_constant.h"
const char* spvTargetEnvDescription(spv_target_env env) {
switch (env) {
diff --git a/source/spirv_validator_options.cpp b/source/spirv_validator_options.cpp
index daa53ebd..0c062536 100644
--- a/source/spirv_validator_options.cpp
+++ b/source/spirv_validator_options.cpp
@@ -15,7 +15,7 @@
#include <cassert>
#include <cstring>
-#include "spirv_validator_options.h"
+#include "source/spirv_validator_options.h"
bool spvParseUniversalLimitsOptions(const char* s, spv_validator_limit* type) {
auto match = [s](const char* b) {
diff --git a/source/table.cpp b/source/table.cpp
index 9f8be862..b10d776d 100644
--- a/source/table.cpp
+++ b/source/table.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "table.h"
+#include "source/table.h"
#include <utility>
diff --git a/source/table.h b/source/table.h
index 0ad5bb52..9790136b 100644
--- a/source/table.h
+++ b/source/table.h
@@ -15,10 +15,10 @@
#ifndef SOURCE_TABLE_H_
#define SOURCE_TABLE_H_
-#include "latest_version_spirv_header.h"
+#include "source/latest_version_spirv_header.h"
-#include "extensions.h"
-#include "message.h"
+#include "source/extensions.h"
+#include "source/message.h"
#include "spirv-tools/libspirv.hpp"
typedef struct spv_opcode_desc_t {
diff --git a/source/text.cpp b/source/text.cpp
index d16e2f47..ba575f90 100644
--- a/source/text.cpp
+++ b/source/text.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "text.h"
+#include "source/text.h"
#include <algorithm>
#include <cassert>
@@ -21,26 +21,28 @@
#include <cstdlib>
#include <cstring>
#include <memory>
+#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
+#include <utility>
#include <vector>
-#include "assembly_grammar.h"
-#include "binary.h"
-#include "diagnostic.h"
-#include "ext_inst.h"
-#include "instruction.h"
-#include "message.h"
-#include "opcode.h"
-#include "operand.h"
+#include "source/assembly_grammar.h"
+#include "source/binary.h"
+#include "source/diagnostic.h"
+#include "source/ext_inst.h"
+#include "source/instruction.h"
+#include "source/message.h"
+#include "source/opcode.h"
+#include "source/operand.h"
+#include "source/spirv_constant.h"
+#include "source/spirv_target_env.h"
+#include "source/table.h"
+#include "source/text_handler.h"
+#include "source/util/bitutils.h"
+#include "source/util/parse_number.h"
#include "spirv-tools/libspirv.h"
-#include "spirv_constant.h"
-#include "spirv_target_env.h"
-#include "table.h"
-#include "text_handler.h"
-#include "util/bitutils.h"
-#include "util/parse_number.h"
bool spvIsValidIDCharacter(const char value) {
return value == '_' || 0 != ::isalnum(value);
diff --git a/source/text.h b/source/text.h
index 727cb2f6..fa34ee16 100644
--- a/source/text.h
+++ b/source/text.h
@@ -17,9 +17,9 @@
#include <string>
-#include "operand.h"
+#include "source/operand.h"
+#include "source/spirv_constant.h"
#include "spirv-tools/libspirv.h"
-#include "spirv_constant.h"
typedef enum spv_literal_type_t {
SPV_LITERAL_TYPE_INT_32,
diff --git a/source/text_handler.cpp b/source/text_handler.cpp
index 49a1675a..37b47fc0 100644
--- a/source/text_handler.cpp
+++ b/source/text_handler.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "text_handler.h"
+#include "source/text_handler.h"
#include <algorithm>
#include <cassert>
@@ -20,15 +20,15 @@
#include <cstring>
#include <tuple>
-#include "assembly_grammar.h"
-#include "binary.h"
-#include "ext_inst.h"
-#include "instruction.h"
-#include "opcode.h"
-#include "text.h"
-#include "util/bitutils.h"
-#include "util/hex_float.h"
-#include "util/parse_number.h"
+#include "source/assembly_grammar.h"
+#include "source/binary.h"
+#include "source/ext_inst.h"
+#include "source/instruction.h"
+#include "source/opcode.h"
+#include "source/text.h"
+#include "source/util/bitutils.h"
+#include "source/util/hex_float.h"
+#include "source/util/parse_number.h"
namespace spvtools {
namespace {
diff --git a/source/text_handler.h b/source/text_handler.h
index daefdc8b..6785f25f 100644
--- a/source/text_handler.h
+++ b/source/text_handler.h
@@ -16,15 +16,18 @@
#define SOURCE_TEXT_HANDLER_H_
#include <iomanip>
+#include <set>
#include <sstream>
+#include <string>
#include <type_traits>
#include <unordered_map>
+#include <utility>
-#include "diagnostic.h"
-#include "instruction.h"
-#include "message.h"
+#include "source/diagnostic.h"
+#include "source/instruction.h"
+#include "source/message.h"
+#include "source/text.h"
#include "spirv-tools/libspirv.h"
-#include "text.h"
namespace spvtools {
diff --git a/source/util/bit_stream.cpp b/source/util/bit_stream.cpp
index e30c6262..a275a63a 100644
--- a/source/util/bit_stream.cpp
+++ b/source/util/bit_stream.cpp
@@ -18,7 +18,7 @@
#include <sstream>
#include <type_traits>
-#include "util/bit_stream.h"
+#include "source/util/bit_stream.h"
namespace spvtools {
namespace utils {
diff --git a/source/util/bit_stream.h b/source/util/bit_stream.h
index d4c81215..58165374 100644
--- a/source/util/bit_stream.h
+++ b/source/util/bit_stream.h
@@ -23,6 +23,7 @@
#include <functional>
#include <sstream>
#include <string>
+#include <utility>
#include <vector>
namespace spvtools {
diff --git a/source/util/bit_vector.cpp b/source/util/bit_vector.cpp
index 61516579..47e275bf 100644
--- a/source/util/bit_vector.cpp
+++ b/source/util/bit_vector.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "bit_vector.h"
+#include "source/util/bit_vector.h"
#include <cassert>
#include <iostream>
diff --git a/source/util/hex_float.h b/source/util/hex_float.h
index 03ce8228..b7baf093 100644
--- a/source/util/hex_float.h
+++ b/source/util/hex_float.h
@@ -24,7 +24,7 @@
#include <sstream>
#include <vector>
-#include "bitutils.h"
+#include "source/util/bitutils.h"
#ifndef __GNUC__
#define GCC_VERSION 0
diff --git a/source/util/huffman_codec.h b/source/util/huffman_codec.h
index ed8d1b90..705bac1c 100644
--- a/source/util/huffman_codec.h
+++ b/source/util/huffman_codec.h
@@ -27,8 +27,10 @@
#include <queue>
#include <sstream>
#include <stack>
+#include <string>
#include <tuple>
#include <unordered_map>
+#include <utility>
#include <vector>
namespace spvtools {
diff --git a/source/util/ilist.h b/source/util/ilist.h
index a2905e93..9837b09b 100644
--- a/source/util/ilist.h
+++ b/source/util/ilist.h
@@ -20,7 +20,7 @@
#include <type_traits>
#include <vector>
-#include "ilist_node.h"
+#include "source/util/ilist_node.h"
namespace spvtools {
namespace utils {
diff --git a/source/util/move_to_front.h b/source/util/move_to_front.h
index 67c6f6eb..bf2eba46 100644
--- a/source/util/move_to_front.h
+++ b/source/util/move_to_front.h
@@ -26,6 +26,7 @@
#include <sstream>
#include <unordered_map>
#include <unordered_set>
+#include <utility>
#include <vector>
namespace spvtools {
diff --git a/source/util/parse_number.cpp b/source/util/parse_number.cpp
index e983072f..d0b13c64 100644
--- a/source/util/parse_number.cpp
+++ b/source/util/parse_number.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "util/parse_number.h"
+#include "source/util/parse_number.h"
#include <functional>
#include <iomanip>
@@ -21,7 +21,7 @@
#include <string>
#include <tuple>
-#include "util/hex_float.h"
+#include "source/util/hex_float.h"
namespace spvtools {
namespace utils {
diff --git a/source/util/parse_number.h b/source/util/parse_number.h
index ef54a9dc..729aac54 100644
--- a/source/util/parse_number.h
+++ b/source/util/parse_number.h
@@ -19,8 +19,8 @@
#include <string>
#include <tuple>
+#include "source/util/hex_float.h"
#include "spirv-tools/libspirv.h"
-#include "util/hex_float.h"
namespace spvtools {
namespace utils {
diff --git a/source/util/small_vector.h b/source/util/small_vector.h
index 2d1a52df..49a03811 100644
--- a/source/util/small_vector.h
+++ b/source/util/small_vector.h
@@ -17,9 +17,11 @@
#include <cassert>
#include <iostream>
+#include <memory>
+#include <utility>
#include <vector>
-#include "opt/make_unique.h"
+#include "source/opt/make_unique.h"
namespace spvtools {
namespace utils {
diff --git a/source/util/string_utils.cpp b/source/util/string_utils.cpp
index 435bbe17..29ce2aa4 100644
--- a/source/util/string_utils.cpp
+++ b/source/util/string_utils.cpp
@@ -16,7 +16,7 @@
#include <cstdint>
#include <type_traits>
-#include "util/string_utils.h"
+#include "source/util/string_utils.h"
namespace spvtools {
namespace utils {
diff --git a/source/util/string_utils.h b/source/util/string_utils.h
index 7d329dd3..322c574f 100644
--- a/source/util/string_utils.h
+++ b/source/util/string_utils.h
@@ -18,7 +18,7 @@
#include <sstream>
#include <string>
-#include "util/string_utils.h"
+#include "source/util/string_utils.h"
namespace spvtools {
namespace utils {
diff --git a/source/util/timer.cpp b/source/util/timer.cpp
index a90e41a2..c8b8d5b6 100644
--- a/source/util/timer.cpp
+++ b/source/util/timer.cpp
@@ -14,7 +14,7 @@
#if defined(SPIRV_TIMER_ENABLED)
-#include "util/timer.h"
+#include "source/util/timer.h"
#include <sys/resource.h>
#include <sys/time.h>
diff --git a/source/val/basic_block.cpp b/source/val/basic_block.cpp
index ce1a3b51..a53103c8 100644
--- a/source/val/basic_block.cpp
+++ b/source/val/basic_block.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "val/basic_block.h"
+#include "source/val/basic_block.h"
#include <algorithm>
#include <utility>
diff --git a/source/val/basic_block.h b/source/val/basic_block.h
index 7d4ded5d..efbd243b 100644
--- a/source/val/basic_block.h
+++ b/source/val/basic_block.h
@@ -15,15 +15,14 @@
#ifndef SOURCE_VAL_BASIC_BLOCK_H_
#define SOURCE_VAL_BASIC_BLOCK_H_
-#include "latest_version_spirv_header.h"
-
#include <cstdint>
-
#include <bitset>
#include <functional>
#include <memory>
#include <vector>
+#include "source/latest_version_spirv_header.h"
+
namespace spvtools {
namespace val {
diff --git a/source/val/construct.cpp b/source/val/construct.cpp
index 6a70ab25..c11a065b 100644
--- a/source/val/construct.cpp
+++ b/source/val/construct.cpp
@@ -12,13 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "val/construct.h"
-#include "val/function.h"
+#include "source/val/construct.h"
#include <cassert>
#include <cstddef>
#include <unordered_set>
+#include "source/val/function.h"
+
namespace spvtools {
namespace val {
diff --git a/source/val/construct.h b/source/val/construct.h
index 6b64ce6b..c7e7a780 100644
--- a/source/val/construct.h
+++ b/source/val/construct.h
@@ -15,12 +15,12 @@
#ifndef SOURCE_VAL_CONSTRUCT_H_
#define SOURCE_VAL_CONSTRUCT_H_
-#include "val/basic_block.h"
-
#include <cstdint>
#include <set>
#include <vector>
+#include "source/val/basic_block.h"
+
namespace spvtools {
namespace val {
diff --git a/source/val/decoration.h b/source/val/decoration.h
index 52a9aad7..ed3320f8 100644
--- a/source/val/decoration.h
+++ b/source/val/decoration.h
@@ -19,7 +19,7 @@
#include <unordered_map>
#include <vector>
-#include "latest_version_spirv_header.h"
+#include "source/latest_version_spirv_header.h"
namespace spvtools {
namespace val {
diff --git a/source/val/function.cpp b/source/val/function.cpp
index d1599b71..f638fb5b 100644
--- a/source/val/function.cpp
+++ b/source/val/function.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "val/function.h"
+#include "source/val/function.h"
#include <cassert>
@@ -22,10 +22,10 @@
#include <unordered_set>
#include <utility>
-#include "cfa.h"
-#include "val/basic_block.h"
-#include "val/construct.h"
-#include "validate.h"
+#include "source/cfa.h"
+#include "source/val/basic_block.h"
+#include "source/val/construct.h"
+#include "source/val/validate.h"
namespace spvtools {
namespace val {
diff --git a/source/val/function.h b/source/val/function.h
index 461a8fba..a052bbda 100644
--- a/source/val/function.h
+++ b/source/val/function.h
@@ -19,14 +19,16 @@
#include <list>
#include <map>
#include <set>
+#include <string>
#include <unordered_map>
#include <unordered_set>
+#include <utility>
#include <vector>
-#include "latest_version_spirv_header.h"
+#include "source/latest_version_spirv_header.h"
+#include "source/val/basic_block.h"
+#include "source/val/construct.h"
#include "spirv-tools/libspirv.h"
-#include "val/basic_block.h"
-#include "val/construct.h"
namespace spvtools {
namespace val {
diff --git a/source/val/instruction.cpp b/source/val/instruction.cpp
index 675d6395..b9155898 100644
--- a/source/val/instruction.cpp
+++ b/source/val/instruction.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "val/instruction.h"
+#include "source/val/instruction.h"
#include <utility>
diff --git a/source/val/instruction.h b/source/val/instruction.h
index 6c78b83b..1fa855fc 100644
--- a/source/val/instruction.h
+++ b/source/val/instruction.h
@@ -21,8 +21,8 @@
#include <utility>
#include <vector>
+#include "source/table.h"
#include "spirv-tools/libspirv.h"
-#include "table.h"
namespace spvtools {
namespace val {
diff --git a/source/val/validate.h b/source/val/validate.h
index 45709c9c..3c64fb6a 100644
--- a/source/val/validate.h
+++ b/source/val/validate.h
@@ -16,6 +16,7 @@
#define SOURCE_VAL_VALIDATE_H_
#include <functional>
+#include <memory>
#include <utility>
#include <vector>
diff --git a/source/val/validate_arithmetics.cpp b/source/val/validate_arithmetics.cpp
index df85276d..2314e7df 100644
--- a/source/val/validate_arithmetics.cpp
+++ b/source/val/validate_arithmetics.cpp
@@ -16,6 +16,8 @@
#include "source/val/validate.h"
+#include <vector>
+
#include "source/diagnostic.h"
#include "source/opcode.h"
#include "source/val/instruction.h"
diff --git a/source/val/validate_barriers.cpp b/source/val/validate_barriers.cpp
index dfeb9937..895df363 100644
--- a/source/val/validate_barriers.cpp
+++ b/source/val/validate_barriers.cpp
@@ -16,6 +16,8 @@
#include "source/val/validate.h"
+#include <string>
+
#include "source/diagnostic.h"
#include "source/opcode.h"
#include "source/spirv_constant.h"
diff --git a/source/val/validate_builtins.cpp b/source/val/validate_builtins.cpp
index 6c885021..c791e428 100644
--- a/source/val/validate_builtins.cpp
+++ b/source/val/validate_builtins.cpp
@@ -22,6 +22,7 @@
#include <set>
#include <sstream>
#include <stack>
+#include <string>
#include <unordered_map>
#include <vector>
diff --git a/source/val/validate_capability.cpp b/source/val/validate_capability.cpp
index bb97ded2..4724b9f7 100644
--- a/source/val/validate_capability.cpp
+++ b/source/val/validate_capability.cpp
@@ -17,6 +17,7 @@
#include "source/val/validate.h"
#include <cassert>
+#include <string>
#include <unordered_set>
#include "source/diagnostic.h"
diff --git a/source/val/validate_decorations.cpp b/source/val/validate_decorations.cpp
index 2f0d007d..bfaa6456 100644
--- a/source/val/validate_decorations.cpp
+++ b/source/val/validate_decorations.cpp
@@ -19,6 +19,7 @@
#include <string>
#include <unordered_map>
#include <utility>
+#include <vector>
#include "source/diagnostic.h"
#include "source/opcode.h"
diff --git a/source/val/validate_derivatives.cpp b/source/val/validate_derivatives.cpp
index 398e79ab..951e2142 100644
--- a/source/val/validate_derivatives.cpp
+++ b/source/val/validate_derivatives.cpp
@@ -16,6 +16,8 @@
#include "source/val/validate.h"
+#include <string>
+
#include "source/diagnostic.h"
#include "source/opcode.h"
#include "source/val/instruction.h"
diff --git a/source/val/validate_ext_inst.cpp b/source/val/validate_ext_inst.cpp
index b72c3634..24565719 100644
--- a/source/val/validate_ext_inst.cpp
+++ b/source/val/validate_ext_inst.cpp
@@ -17,6 +17,8 @@
#include "source/val/validate.h"
#include <sstream>
+#include <string>
+#include <vector>
#include "source/diagnostic.h"
#include "source/latest_version_glsl_std_450_header.h"
diff --git a/source/val/validate_id.cpp b/source/val/validate_id.cpp
index af690518..ee1f0b54 100644
--- a/source/val/validate_id.cpp
+++ b/source/val/validate_id.cpp
@@ -20,6 +20,7 @@
#include <iostream>
#include <iterator>
#include <stack>
+#include <string>
#include <unordered_set>
#include <utility>
#include <vector>
diff --git a/source/val/validate_image.cpp b/source/val/validate_image.cpp
index 47c3e43e..f2be9dca 100644
--- a/source/val/validate_image.cpp
+++ b/source/val/validate_image.cpp
@@ -16,6 +16,8 @@
#include "source/val/validate.h"
+#include <string>
+
#include "source/diagnostic.h"
#include "source/opcode.h"
#include "source/spirv_target_env.h"
diff --git a/source/val/validate_instruction.cpp b/source/val/validate_instruction.cpp
index 33e1bc77..85995caa 100644
--- a/source/val/validate_instruction.cpp
+++ b/source/val/validate_instruction.cpp
@@ -18,9 +18,9 @@
#include <algorithm>
#include <cassert>
-
#include <sstream>
#include <string>
+#include <vector>
#include "source/binary.h"
#include "source/diagnostic.h"
diff --git a/source/val/validate_interfaces.cpp b/source/val/validate_interfaces.cpp
index 354e4be4..b5d680e5 100644
--- a/source/val/validate_interfaces.cpp
+++ b/source/val/validate_interfaces.cpp
@@ -15,6 +15,7 @@
#include "source/val/validate.h"
#include <algorithm>
+#include <vector>
#include "source/diagnostic.h"
#include "source/val/function.h"
diff --git a/source/val/validate_memory.cpp b/source/val/validate_memory.cpp
index 7f0f5788..55060921 100644
--- a/source/val/validate_memory.cpp
+++ b/source/val/validate_memory.cpp
@@ -15,6 +15,8 @@
#include "source/val/validate.h"
#include <algorithm>
+#include <string>
+#include <vector>
#include "source/opcode.h"
#include "source/val/instruction.h"
diff --git a/source/val/validation_state.cpp b/source/val/validation_state.cpp
index 27d1fa63..e0c9e5ba 100644
--- a/source/val/validation_state.cpp
+++ b/source/val/validation_state.cpp
@@ -12,17 +12,18 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "val/validation_state.h"
+#include "source/val/validation_state.h"
#include <cassert>
#include <stack>
+#include <utility>
-#include "opcode.h"
+#include "source/opcode.h"
+#include "source/spirv_target_env.h"
+#include "source/val/basic_block.h"
+#include "source/val/construct.h"
+#include "source/val/function.h"
#include "spirv-tools/libspirv.h"
-#include "spirv_target_env.h"
-#include "val/basic_block.h"
-#include "val/construct.h"
-#include "val/function.h"
namespace spvtools {
namespace val {
diff --git a/source/val/validation_state.h b/source/val/validation_state.h
index 3dbc2d77..d93fe1e9 100644
--- a/source/val/validation_state.h
+++ b/source/val/validation_state.h
@@ -15,6 +15,7 @@
#ifndef SOURCE_VAL_VALIDATION_STATE_H_
#define SOURCE_VAL_VALIDATION_STATE_H_
+#include <map>
#include <set>
#include <string>
#include <tuple>
@@ -22,17 +23,17 @@
#include <unordered_set>
#include <vector>
-#include "assembly_grammar.h"
-#include "decoration.h"
-#include "diagnostic.h"
-#include "disassemble.h"
-#include "enum_set.h"
-#include "latest_version_spirv_header.h"
+#include "source/assembly_grammar.h"
+#include "source/diagnostic.h"
+#include "source/disassemble.h"
+#include "source/enum_set.h"
+#include "source/latest_version_spirv_header.h"
+#include "source/spirv_definition.h"
+#include "source/spirv_validator_options.h"
+#include "source/val/decoration.h"
+#include "source/val/function.h"
+#include "source/val/instruction.h"
#include "spirv-tools/libspirv.h"
-#include "spirv_definition.h"
-#include "spirv_validator_options.h"
-#include "val/function.h"
-#include "val/instruction.h"
namespace spvtools {
namespace val {
diff --git a/test/assembly_context_test.cpp b/test/assembly_context_test.cpp
index 40ba5bd0..b6d60b95 100644
--- a/test/assembly_context_test.cpp
+++ b/test/assembly_context_test.cpp
@@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "unit_spirv.h"
-
-#include <gmock/gmock.h>
+#include <string>
#include <vector>
+#include "gmock/gmock.h"
#include "source/instruction.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/assembly_format_test.cpp b/test/assembly_format_test.cpp
index d760e66b..59e500b8 100644
--- a/test/assembly_format_test.cpp
+++ b/test/assembly_format_test.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "test_fixture.h"
+#include "test/test_fixture.h"
namespace svptools {
namespace {
diff --git a/test/binary_destroy_test.cpp b/test/binary_destroy_test.cpp
index 26c559a5..e3870c9f 100644
--- a/test/binary_destroy_test.cpp
+++ b/test/binary_destroy_test.cpp
@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "unit_spirv.h"
+#include "test/unit_spirv.h"
-#include "test_fixture.h"
+#include "test/test_fixture.h"
namespace spvtools {
namespace {
diff --git a/test/binary_endianness_test.cpp b/test/binary_endianness_test.cpp
index 194d799a..3cd405d5 100644
--- a/test/binary_endianness_test.cpp
+++ b/test/binary_endianness_test.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "unit_spirv.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/binary_header_get_test.cpp b/test/binary_header_get_test.cpp
index 751433a1..e771f1a3 100644
--- a/test/binary_header_get_test.cpp
+++ b/test/binary_header_get_test.cpp
@@ -13,7 +13,7 @@
// limitations under the License.
#include "source/spirv_constant.h"
-#include "unit_spirv.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/binary_parse_test.cpp b/test/binary_parse_test.cpp
index fab89377..9d7fd18c 100644
--- a/test/binary_parse_test.cpp
+++ b/test/binary_parse_test.cpp
@@ -12,16 +12,18 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <algorithm>
+#include <limits>
#include <sstream>
#include <string>
#include <vector>
#include "gmock/gmock.h"
-#include "latest_version_opencl_std_header.h"
+#include "source/latest_version_opencl_std_header.h"
#include "source/message.h"
#include "source/table.h"
-#include "test_fixture.h"
-#include "unit_spirv.h"
+#include "test/test_fixture.h"
+#include "test/unit_spirv.h"
// Returns true if two spv_parsed_operand_t values are equal.
// To use this operator, this definition must appear in the same namespace
diff --git a/test/binary_strnlen_s_test.cpp b/test/binary_strnlen_s_test.cpp
index 0903465b..5f43bde6 100644
--- a/test/binary_strnlen_s_test.cpp
+++ b/test/binary_strnlen_s_test.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "unit_spirv.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/binary_to_text.literal_test.cpp b/test/binary_to_text.literal_test.cpp
index 65b98d26..bcfb0f01 100644
--- a/test/binary_to_text.literal_test.cpp
+++ b/test/binary_to_text.literal_test.cpp
@@ -12,10 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "unit_spirv.h"
+#include <string>
+#include <utility>
+#include <vector>
#include "gmock/gmock.h"
-#include "test_fixture.h"
+#include "test/test_fixture.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/binary_to_text_test.cpp b/test/binary_to_text_test.cpp
index 291b0e18..016041f4 100644
--- a/test/binary_to_text_test.cpp
+++ b/test/binary_to_text_test.cpp
@@ -12,14 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "unit_spirv.h"
-
#include <sstream>
+#include <string>
+#include <tuple>
+#include <vector>
#include "gmock/gmock.h"
-
#include "source/spirv_constant.h"
-#include "test_fixture.h"
+#include "test/test_fixture.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/bit_stream.cpp b/test/bit_stream.cpp
index eca5802e..16e4f20d 100644
--- a/test/bit_stream.cpp
+++ b/test/bit_stream.cpp
@@ -12,12 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <limits>
#include <sstream>
#include <string>
+#include <utility>
#include <vector>
#include "gmock/gmock.h"
-#include "util/bit_stream.h"
+#include "source/util/bit_stream.h"
namespace spvtools {
namespace utils {
diff --git a/test/c_interface_test.cpp b/test/c_interface_test.cpp
index 62dad24e..6adc1602 100644
--- a/test/c_interface_test.cpp
+++ b/test/c_interface_test.cpp
@@ -12,11 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gtest/gtest.h>
-
-#include "message.h"
+#include "gtest/gtest.h"
+#include "source/message.h"
+#include "source/table.h"
#include "spirv-tools/libspirv.h"
-#include "table.h"
namespace spvtools {
namespace {
diff --git a/test/comment_test.cpp b/test/comment_test.cpp
index e95c4846..f46b72ac 100644
--- a/test/comment_test.cpp
+++ b/test/comment_test.cpp
@@ -12,9 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <string>
+
#include "gmock/gmock.h"
-#include "test_fixture.h"
-#include "unit_spirv.h"
+#include "test/test_fixture.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/comp/markv_codec_test.cpp b/test/comp/markv_codec_test.cpp
index 2502e329..76918f74 100644
--- a/test/comp/markv_codec_test.cpp
+++ b/test/comp/markv_codec_test.cpp
@@ -17,12 +17,13 @@
#include <functional>
#include <memory>
#include <string>
+#include <vector>
#include "gmock/gmock.h"
#include "source/comp/markv.h"
-#include "test_fixture.h"
+#include "test/test_fixture.h"
+#include "test/unit_spirv.h"
#include "tools/comp/markv_model_factory.h"
-#include "unit_spirv.h"
namespace spvtools {
namespace comp {
diff --git a/test/cpp_interface_test.cpp b/test/cpp_interface_test.cpp
index b8cbf2d1..bebf3275 100644
--- a/test/cpp_interface_test.cpp
+++ b/test/cpp_interface_test.cpp
@@ -12,9 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
+#include <string>
+#include <utility>
+#include <vector>
+#include "gmock/gmock.h"
+#include "gtest/gtest.h"
#include "spirv-tools/optimizer.hpp"
#include "spirv/1.1/spirv.h"
diff --git a/test/diagnostic_test.cpp b/test/diagnostic_test.cpp
index 60f5cbef..f86bae11 100644
--- a/test/diagnostic_test.cpp
+++ b/test/diagnostic_test.cpp
@@ -14,9 +14,10 @@
#include <algorithm>
#include <sstream>
+#include <utility>
#include "gmock/gmock.h"
-#include "unit_spirv.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/enum_set_test.cpp b/test/enum_set_test.cpp
index f4b2467e..ddacd421 100644
--- a/test/enum_set_test.cpp
+++ b/test/enum_set_test.cpp
@@ -12,11 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <algorithm>
+#include <utility>
#include <vector>
-#include "gmock/gmock.h"
-#include "enum_set.h"
-#include "unit_spirv.h"
+#include "gmock/gmock.h"
+#include "source/enum_set.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/enum_string_mapping_test.cpp b/test/enum_string_mapping_test.cpp
index 94080bd7..b525d601 100644
--- a/test/enum_string_mapping_test.cpp
+++ b/test/enum_string_mapping_test.cpp
@@ -15,10 +15,12 @@
// Tests for OpExtension validator rules.
#include <string>
+#include <utility>
+#include <vector>
-#include "enum_string_mapping.h"
-#include "extensions.h"
#include "gtest/gtest.h"
+#include "source/enum_string_mapping.h"
+#include "source/extensions.h"
namespace spvtools {
namespace {
diff --git a/test/ext_inst.debuginfo_test.cpp b/test/ext_inst.debuginfo_test.cpp
index 18105909..15fa8f76 100644
--- a/test/ext_inst.debuginfo_test.cpp
+++ b/test/ext_inst.debuginfo_test.cpp
@@ -12,11 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "unit_spirv.h"
+#include <string>
+#include <vector>
-#include <gmock/gmock.h>
#include "DebugInfo.h"
-#include "test_fixture.h"
+#include "gmock/gmock.h"
+#include "test/test_fixture.h"
+#include "test/unit_spirv.h"
// This file tests the correctness of encoding and decoding of instructions
// involving the DebugInfo extended instruction set.
diff --git a/test/ext_inst.glsl_test.cpp b/test/ext_inst.glsl_test.cpp
index e42bc847..991c487f 100644
--- a/test/ext_inst.glsl_test.cpp
+++ b/test/ext_inst.glsl_test.cpp
@@ -13,10 +13,11 @@
// limitations under the License.
#include <algorithm>
+#include <string>
#include <vector>
-#include "latest_version_glsl_std_450_header.h"
-#include "unit_spirv.h"
+#include "source/latest_version_glsl_std_450_header.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/ext_inst.opencl_test.cpp b/test/ext_inst.opencl_test.cpp
index a6950bf6..06bc5e84 100644
--- a/test/ext_inst.opencl_test.cpp
+++ b/test/ext_inst.opencl_test.cpp
@@ -12,11 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "unit_spirv.h"
+#include <string>
+#include <vector>
-#include <gmock/gmock.h>
-#include "latest_version_opencl_std_header.h"
-#include "test_fixture.h"
+#include "gmock/gmock.h"
+#include "source/latest_version_opencl_std_header.h"
+#include "test/test_fixture.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/fix_word_test.cpp b/test/fix_word_test.cpp
index d7ddffd7..b8c3a33d 100644
--- a/test/fix_word_test.cpp
+++ b/test/fix_word_test.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "unit_spirv.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/fuzzers/spvtools_opt_legalization_fuzzer.cpp b/test/fuzzers/spvtools_opt_legalization_fuzzer.cpp
index f37dcc84..b45a98c3 100644
--- a/test/fuzzers/spvtools_opt_legalization_fuzzer.cpp
+++ b/test/fuzzers/spvtools_opt_legalization_fuzzer.cpp
@@ -13,6 +13,7 @@
// limitations under the License.
#include <cstdint>
+#include <vector>
#include "spirv-tools/optimizer.hpp"
diff --git a/test/fuzzers/spvtools_opt_performance_fuzzer.cpp b/test/fuzzers/spvtools_opt_performance_fuzzer.cpp
index 7f94febc..6c3bd6ab 100644
--- a/test/fuzzers/spvtools_opt_performance_fuzzer.cpp
+++ b/test/fuzzers/spvtools_opt_performance_fuzzer.cpp
@@ -13,6 +13,7 @@
// limitations under the License.
#include <cstdint>
+#include <vector>
#include "spirv-tools/optimizer.hpp"
diff --git a/test/fuzzers/spvtools_opt_size_fuzzer.cpp b/test/fuzzers/spvtools_opt_size_fuzzer.cpp
index 1f06a71f..68c79747 100644
--- a/test/fuzzers/spvtools_opt_size_fuzzer.cpp
+++ b/test/fuzzers/spvtools_opt_size_fuzzer.cpp
@@ -13,6 +13,7 @@
// limitations under the License.
#include <cstdint>
+#include <vector>
#include "spirv-tools/optimizer.hpp"
diff --git a/test/fuzzers/spvtools_val_fuzzer.cpp b/test/fuzzers/spvtools_val_fuzzer.cpp
index 9b06a1f6..5dc4303b 100644
--- a/test/fuzzers/spvtools_val_fuzzer.cpp
+++ b/test/fuzzers/spvtools_val_fuzzer.cpp
@@ -13,6 +13,7 @@
// limitations under the License.
#include <cstdint>
+#include <vector>
#include "spirv-tools/libspirv.hpp"
diff --git a/test/generator_magic_number_test.cpp b/test/generator_magic_number_test.cpp
index 9e49dae7..bc5fdf57 100644
--- a/test/generator_magic_number_test.cpp
+++ b/test/generator_magic_number_test.cpp
@@ -12,11 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "unit_spirv.h"
-
-#include <gmock/gmock.h>
+#include <limits>
+#include <string>
+#include <utility>
+#include <vector>
+#include "gmock/gmock.h"
#include "source/opcode.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/hex_float_test.cpp b/test/hex_float_test.cpp
index dc21d16d..6b805f34 100644
--- a/test/hex_float_test.cpp
+++ b/test/hex_float_test.cpp
@@ -15,14 +15,16 @@
#include <cfloat>
#include <cmath>
#include <cstdio>
+#include <limits>
#include <sstream>
#include <string>
#include <tuple>
+#include <utility>
+#include <vector>
-#include <gmock/gmock.h>
-
+#include "gmock/gmock.h"
#include "source/util/hex_float.h"
-#include "unit_spirv.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace utils {
diff --git a/test/huffman_codec.cpp b/test/huffman_codec.cpp
index defb7733..653caad8 100644
--- a/test/huffman_codec.cpp
+++ b/test/huffman_codec.cpp
@@ -14,14 +14,17 @@
// Contains utils for reading, writing and debug printing bit streams.
+#include <algorithm>
#include <map>
#include <sstream>
#include <string>
#include <unordered_map>
+#include <utility>
+#include <vector>
#include "gmock/gmock.h"
-#include "util/bit_stream.h"
-#include "util/huffman_codec.h"
+#include "source/util/bit_stream.h"
+#include "source/util/huffman_codec.h"
namespace spvtools {
namespace utils {
diff --git a/test/immediate_int_test.cpp b/test/immediate_int_test.cpp
index b26a7af7..393075a4 100644
--- a/test/immediate_int_test.cpp
+++ b/test/immediate_int_test.cpp
@@ -16,10 +16,9 @@
#include <string>
#include <vector>
-#include <gmock/gmock.h>
-
+#include "gmock/gmock.h"
#include "source/util/bitutils.h"
-#include "test_fixture.h"
+#include "test/test_fixture.h"
namespace spvtools {
namespace utils {
diff --git a/test/libspirv_macros_test.cpp b/test/libspirv_macros_test.cpp
index edb46c36..bf5add67 100644
--- a/test/libspirv_macros_test.cpp
+++ b/test/libspirv_macros_test.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "unit_spirv.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/link/binary_version_test.cpp b/test/link/binary_version_test.cpp
index 89f39476..0ceeebae 100644
--- a/test/link/binary_version_test.cpp
+++ b/test/link/binary_version_test.cpp
@@ -12,8 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <string>
+
#include "gmock/gmock.h"
-#include "linker_fixture.h"
+#include "test/link/linker_fixture.h"
namespace spvtools {
namespace {
diff --git a/test/link/entry_points_test.cpp b/test/link/entry_points_test.cpp
index 632cde3e..bac8e02e 100644
--- a/test/link/entry_points_test.cpp
+++ b/test/link/entry_points_test.cpp
@@ -12,8 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <string>
+
#include "gmock/gmock.h"
-#include "linker_fixture.h"
+#include "test/link/linker_fixture.h"
namespace spvtools {
namespace {
diff --git a/test/link/global_values_amount_test.cpp b/test/link/global_values_amount_test.cpp
index d0d953d3..9901d21d 100644
--- a/test/link/global_values_amount_test.cpp
+++ b/test/link/global_values_amount_test.cpp
@@ -12,8 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <string>
+
#include "gmock/gmock.h"
-#include "linker_fixture.h"
+#include "test/link/linker_fixture.h"
namespace spvtools {
namespace {
diff --git a/test/link/ids_limit_test.cpp b/test/link/ids_limit_test.cpp
index a89ffe41..6d7815a2 100644
--- a/test/link/ids_limit_test.cpp
+++ b/test/link/ids_limit_test.cpp
@@ -12,8 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <string>
+
#include "gmock/gmock.h"
-#include "linker_fixture.h"
+#include "test/link/linker_fixture.h"
namespace spvtools {
namespace {
diff --git a/test/link/linker_fixture.h b/test/link/linker_fixture.h
index 92dcad98..a9436840 100644
--- a/test/link/linker_fixture.h
+++ b/test/link/linker_fixture.h
@@ -16,11 +16,12 @@
#define TEST_LINK_LINKER_FIXTURE_H_
#include <iostream>
+#include <string>
+#include <vector>
#include "source/spirv_constant.h"
-#include "unit_spirv.h"
-
#include "spirv-tools/linker.hpp"
+#include "test/unit_spirv.h"
namespace spvtest {
diff --git a/test/link/matching_imports_to_exports_test.cpp b/test/link/matching_imports_to_exports_test.cpp
index b1ee7ed4..59e62d51 100644
--- a/test/link/matching_imports_to_exports_test.cpp
+++ b/test/link/matching_imports_to_exports_test.cpp
@@ -12,8 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <string>
+
#include "gmock/gmock.h"
-#include "linker_fixture.h"
+#include "test/link/linker_fixture.h"
namespace spvtools {
namespace {
diff --git a/test/link/memory_model_test.cpp b/test/link/memory_model_test.cpp
index 4e2cfaf2..2add5046 100644
--- a/test/link/memory_model_test.cpp
+++ b/test/link/memory_model_test.cpp
@@ -12,8 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <string>
+
#include "gmock/gmock.h"
-#include "linker_fixture.h"
+#include "test/link/linker_fixture.h"
namespace spvtools {
namespace {
diff --git a/test/link/partial_linkage_test.cpp b/test/link/partial_linkage_test.cpp
index c2cb5fd5..c43b06e5 100644
--- a/test/link/partial_linkage_test.cpp
+++ b/test/link/partial_linkage_test.cpp
@@ -12,8 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <string>
+
#include "gmock/gmock.h"
-#include "linker_fixture.h"
+#include "test/link/linker_fixture.h"
namespace spvtools {
namespace {
diff --git a/test/link/unique_ids_test.cpp b/test/link/unique_ids_test.cpp
index f95f801f..55c70ea6 100644
--- a/test/link/unique_ids_test.cpp
+++ b/test/link/unique_ids_test.cpp
@@ -12,8 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <string>
+#include <vector>
+
#include "gmock/gmock.h"
-#include "linker_fixture.h"
+#include "test/link/linker_fixture.h"
namespace spvtools {
namespace {
diff --git a/test/log_test.cpp b/test/log_test.cpp
index eeaf7de0..638eea95 100644
--- a/test/log_test.cpp
+++ b/test/log_test.cpp
@@ -12,11 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
-
-#include "message.h"
-#include "opt/log.h"
+#include "source/opt/log.h"
+#include "gmock/gmock.h"
+#include "gtest/gtest.h"
+#include "source/message.h"
namespace spvtools {
namespace {
diff --git a/test/move_to_front_test.cpp b/test/move_to_front_test.cpp
index dfe9b0e1..5f41b5af 100644
--- a/test/move_to_front_test.cpp
+++ b/test/move_to_front_test.cpp
@@ -15,9 +15,11 @@
#include <algorithm>
#include <iostream>
#include <set>
+#include <string>
+#include <vector>
#include "gmock/gmock.h"
-#include "util/move_to_front.h"
+#include "source/util/move_to_front.h"
namespace spvtools {
namespace utils {
diff --git a/test/name_mapper_test.cpp b/test/name_mapper_test.cpp
index 41970d5a..9a9ee8aa 100644
--- a/test/name_mapper_test.cpp
+++ b/test/name_mapper_test.cpp
@@ -12,12 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "gmock/gmock.h"
-
-#include "test_fixture.h"
-#include "unit_spirv.h"
+#include <string>
+#include <vector>
+#include "gmock/gmock.h"
#include "source/name_mapper.h"
+#include "test/test_fixture.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/named_id_test.cpp b/test/named_id_test.cpp
index f70c98f8..4ba54adc 100644
--- a/test/named_id_test.cpp
+++ b/test/named_id_test.cpp
@@ -12,10 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <string>
#include <vector>
-#include "test_fixture.h"
-#include "unit_spirv.h"
+#include "test/test_fixture.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/opcode_make_test.cpp b/test/opcode_make_test.cpp
index 16eda24d..6481ef32 100644
--- a/test/opcode_make_test.cpp
+++ b/test/opcode_make_test.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "unit_spirv.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/opcode_require_capabilities_test.cpp b/test/opcode_require_capabilities_test.cpp
index 6a537823..32bf1dc0 100644
--- a/test/opcode_require_capabilities_test.cpp
+++ b/test/opcode_require_capabilities_test.cpp
@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "unit_spirv.h"
+#include "test/unit_spirv.h"
-#include "enum_set.h"
+#include "source/enum_set.h"
namespace spvtools {
namespace {
diff --git a/test/opcode_split_test.cpp b/test/opcode_split_test.cpp
index 1ab98eb8..43fedb38 100644
--- a/test/opcode_split_test.cpp
+++ b/test/opcode_split_test.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "unit_spirv.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/opcode_table_get_test.cpp b/test/opcode_table_get_test.cpp
index e63d4011..6f80ad7d 100644
--- a/test/opcode_table_get_test.cpp
+++ b/test/opcode_table_get_test.cpp
@@ -12,9 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
-
-#include "unit_spirv.h"
+#include "gmock/gmock.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/operand_capabilities_test.cpp b/test/operand_capabilities_test.cpp
index baf4f952..0aeb505f 100644
--- a/test/operand_capabilities_test.cpp
+++ b/test/operand_capabilities_test.cpp
@@ -15,11 +15,11 @@
// Test capability dependencies for enums.
#include <tuple>
+#include <vector>
#include "gmock/gmock.h"
-
-#include "enum_set.h"
-#include "unit_spirv.h"
+#include "source/enum_set.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/operand_pattern_test.cpp b/test/operand_pattern_test.cpp
index e3c20e45..b3e30249 100644
--- a/test/operand_pattern_test.cpp
+++ b/test/operand_pattern_test.cpp
@@ -12,10 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "unit_spirv.h"
+#include <vector>
#include "gmock/gmock.h"
#include "source/operand.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/operand_test.cpp b/test/operand_test.cpp
index be927d66..08522c32 100644
--- a/test/operand_test.cpp
+++ b/test/operand_test.cpp
@@ -12,7 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "unit_spirv.h"
+#include <vector>
+
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/opt/aggressive_dead_code_elim_test.cpp b/test/opt/aggressive_dead_code_elim_test.cpp
index 3164412b..873fc34e 100644
--- a/test/opt/aggressive_dead_code_elim_test.cpp
+++ b/test/opt/aggressive_dead_code_elim_test.cpp
@@ -13,9 +13,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "assembly_builder.h"
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include <string>
+#include <vector>
+
+#include "test/opt/assembly_builder.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/assembly_builder_test.cpp b/test/opt/assembly_builder_test.cpp
index 33c3583e..55fbbe90 100644
--- a/test/opt/assembly_builder_test.cpp
+++ b/test/opt/assembly_builder_test.cpp
@@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "assembly_builder.h"
+#include "test/opt/assembly_builder.h"
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/block_merge_test.cpp b/test/opt/block_merge_test.cpp
index 3c180b72..aaa70cd4 100644
--- a/test/opt/block_merge_test.cpp
+++ b/test/opt/block_merge_test.cpp
@@ -13,8 +13,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include <string>
+
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/ccp_test.cpp b/test/opt/ccp_test.cpp
index 7987d8c1..5ccea71f 100644
--- a/test/opt/ccp_test.cpp
+++ b/test/opt/ccp_test.cpp
@@ -12,12 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <string>
+
#include "gmock/gmock.h"
#include "gtest/gtest.h"
-#include "pass_fixture.h"
-#include "pass_utils.h"
-
-#include "opt/ccp_pass.h"
+#include "source/opt/ccp_pass.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/cfg_cleanup_test.cpp b/test/opt/cfg_cleanup_test.cpp
index 67a27978..369c7667 100644
--- a/test/opt/cfg_cleanup_test.cpp
+++ b/test/opt/cfg_cleanup_test.cpp
@@ -12,8 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include <string>
+
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/combine_access_chains_test.cpp b/test/opt/combine_access_chains_test.cpp
index a9ed9104..ab9e185b 100644
--- a/test/opt/combine_access_chains_test.cpp
+++ b/test/opt/combine_access_chains_test.cpp
@@ -12,10 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "assembly_builder.h"
+#include <string>
+
#include "gmock/gmock.h"
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/common_uniform_elim_test.cpp b/test/opt/common_uniform_elim_test.cpp
index dcba88a9..f5199ed8 100644
--- a/test/opt/common_uniform_elim_test.cpp
+++ b/test/opt/common_uniform_elim_test.cpp
@@ -13,7 +13,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "pass_fixture.h"
+#include <string>
+
+#include "test/opt/pass_fixture.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/compact_ids_test.cpp b/test/opt/compact_ids_test.cpp
index e9937110..feef068b 100644
--- a/test/opt/compact_ids_test.cpp
+++ b/test/opt/compact_ids_test.cpp
@@ -12,13 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
+#include <memory>
+#include <string>
+#include <vector>
+#include "gmock/gmock.h"
#include "spirv-tools/libspirv.hpp"
#include "spirv-tools/optimizer.hpp"
-
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/constant_manager_test.cpp b/test/opt/constant_manager_test.cpp
index 7ca92ad7..57dea651 100644
--- a/test/opt/constant_manager_test.cpp
+++ b/test/opt/constant_manager_test.cpp
@@ -12,12 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
+#include <memory>
+#include <string>
-#include "opt/build_module.h"
-#include "opt/constants.h"
-#include "opt/ir_context.h"
+#include "gmock/gmock.h"
+#include "gtest/gtest.h"
+#include "source/opt/build_module.h"
+#include "source/opt/constants.h"
+#include "source/opt/ir_context.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/copy_prop_array_test.cpp b/test/opt/copy_prop_array_test.cpp
index bd51c0b4..dcce77d2 100644
--- a/test/opt/copy_prop_array_test.cpp
+++ b/test/opt/copy_prop_array_test.cpp
@@ -13,11 +13,11 @@
// limitations under the License.
#include <iostream>
+#include <string>
-#include <gmock/gmock.h>
-
-#include "assembly_builder.h"
-#include "pass_fixture.h"
+#include "gmock/gmock.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/pass_fixture.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/dead_branch_elim_test.cpp b/test/opt/dead_branch_elim_test.cpp
index 379f02e3..939b12de 100644
--- a/test/opt/dead_branch_elim_test.cpp
+++ b/test/opt/dead_branch_elim_test.cpp
@@ -13,8 +13,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include <string>
+
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/dead_insert_elim_test.cpp b/test/opt/dead_insert_elim_test.cpp
index e4128245..8ae6894d 100644
--- a/test/opt/dead_insert_elim_test.cpp
+++ b/test/opt/dead_insert_elim_test.cpp
@@ -13,8 +13,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include <string>
+
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/dead_variable_elim_test.cpp b/test/opt/dead_variable_elim_test.cpp
index 672b2055..fca13a8e 100644
--- a/test/opt/dead_variable_elim_test.cpp
+++ b/test/opt/dead_variable_elim_test.cpp
@@ -12,8 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include <string>
+
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/decoration_manager_test.cpp b/test/opt/decoration_manager_test.cpp
index 85349671..ea6aec52 100644
--- a/test/opt/decoration_manager_test.cpp
+++ b/test/opt/decoration_manager_test.cpp
@@ -13,14 +13,16 @@
// limitations under the License.
#include <iostream>
+#include <memory>
+#include <string>
+#include <vector>
-#include <gmock/gmock.h>
-
+#include "gmock/gmock.h"
#include "source/opt/build_module.h"
#include "source/opt/decoration_manager.h"
#include "source/opt/ir_context.h"
#include "source/spirv_constant.h"
-#include "unit_spirv.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/def_use_test.cpp b/test/opt/def_use_test.cpp
index 10a6382e..3b856ce7 100644
--- a/test/opt/def_use_test.cpp
+++ b/test/opt/def_use_test.cpp
@@ -13,18 +13,21 @@
// limitations under the License.
#include <memory>
+#include <string>
+#include <unordered_map>
#include <unordered_set>
-
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
-
-#include "opt/build_module.h"
-#include "opt/def_use_manager.h"
-#include "opt/ir_context.h"
-#include "opt/module.h"
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include <utility>
+#include <vector>
+
+#include "gmock/gmock.h"
+#include "gtest/gtest.h"
+#include "source/opt/build_module.h"
+#include "source/opt/def_use_manager.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/module.h"
#include "spirv-tools/libspirv.hpp"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/dominator_tree/common_dominators.cpp b/test/opt/dominator_tree/common_dominators.cpp
index 597c3931..dfa03e98 100644
--- a/test/opt/dominator_tree/common_dominators.cpp
+++ b/test/opt/dominator_tree/common_dominators.cpp
@@ -12,11 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
+#include <memory>
+#include <string>
-#include "opt/build_module.h"
-#include "opt/ir_context.h"
+#include "gmock/gmock.h"
+#include "gtest/gtest.h"
+#include "source/opt/build_module.h"
+#include "source/opt/ir_context.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/dominator_tree/generated.cpp b/test/opt/dominator_tree/generated.cpp
index f2340516..43b723e9 100644
--- a/test/opt/dominator_tree/generated.cpp
+++ b/test/opt/dominator_tree/generated.cpp
@@ -12,21 +12,20 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
-
#include <array>
#include <memory>
#include <set>
#include <string>
#include <vector>
-#include "../assembly_builder.h"
-#include "../function_utils.h"
-#include "../pass_fixture.h"
-#include "../pass_utils.h"
-#include "opt/dominator_analysis.h"
-#include "opt/iterator.h"
-#include "opt/pass.h"
+#include "gmock/gmock.h"
+#include "source/opt/dominator_analysis.h"
+#include "source/opt/iterator.h"
+#include "source/opt/pass.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/function_utils.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/dominator_tree/nested_ifs.cpp b/test/opt/dominator_tree/nested_ifs.cpp
index 1c510848..0552b758 100644
--- a/test/opt/dominator_tree/nested_ifs.cpp
+++ b/test/opt/dominator_tree/nested_ifs.cpp
@@ -12,18 +12,18 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
#include <memory>
#include <string>
#include <vector>
-#include "../assembly_builder.h"
-#include "../function_utils.h"
-#include "../pass_fixture.h"
-#include "../pass_utils.h"
-#include "opt/dominator_analysis.h"
-#include "opt/pass.h"
+#include "gmock/gmock.h"
+#include "source/opt/dominator_analysis.h"
+#include "source/opt/pass.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/function_utils.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/dominator_tree/nested_ifs_post.cpp b/test/opt/dominator_tree/nested_ifs_post.cpp
index c1e4e3db..ad759df8 100644
--- a/test/opt/dominator_tree/nested_ifs_post.cpp
+++ b/test/opt/dominator_tree/nested_ifs_post.cpp
@@ -12,18 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
-
#include <memory>
#include <string>
#include <vector>
-#include "../assembly_builder.h"
-#include "../function_utils.h"
-#include "../pass_fixture.h"
-#include "../pass_utils.h"
-#include "opt/dominator_analysis.h"
-#include "opt/pass.h"
+#include "gmock/gmock.h"
+#include "source/opt/dominator_analysis.h"
+#include "source/opt/pass.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/function_utils.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/dominator_tree/nested_loops.cpp b/test/opt/dominator_tree/nested_loops.cpp
index fdaacb02..7d03937b 100644
--- a/test/opt/dominator_tree/nested_loops.cpp
+++ b/test/opt/dominator_tree/nested_loops.cpp
@@ -12,18 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
-
#include <memory>
#include <string>
#include <vector>
-#include "../assembly_builder.h"
-#include "../function_utils.h"
-#include "../pass_fixture.h"
-#include "../pass_utils.h"
-#include "opt/dominator_analysis.h"
-#include "opt/pass.h"
+#include "gmock/gmock.h"
+#include "source/opt/dominator_analysis.h"
+#include "source/opt/pass.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/function_utils.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/dominator_tree/nested_loops_with_unreachables.cpp b/test/opt/dominator_tree/nested_loops_with_unreachables.cpp
index de09be02..e87e8dda 100644
--- a/test/opt/dominator_tree/nested_loops_with_unreachables.cpp
+++ b/test/opt/dominator_tree/nested_loops_with_unreachables.cpp
@@ -12,17 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <memory>
#include <string>
#include <vector>
-#include <gmock/gmock.h>
-
-#include "../assembly_builder.h"
-#include "../function_utils.h"
-#include "../pass_fixture.h"
-#include "../pass_utils.h"
-#include "opt/dominator_analysis.h"
-#include "opt/pass.h"
+#include "gmock/gmock.h"
+#include "source/opt/dominator_analysis.h"
+#include "source/opt/pass.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/function_utils.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/dominator_tree/post.cpp b/test/opt/dominator_tree/post.cpp
index 47d1b5b0..bb10fdef 100644
--- a/test/opt/dominator_tree/post.cpp
+++ b/test/opt/dominator_tree/post.cpp
@@ -12,17 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <memory>
#include <string>
#include <vector>
-#include <gmock/gmock.h>
-
-#include "../assembly_builder.h"
-#include "../function_utils.h"
-#include "../pass_fixture.h"
-#include "../pass_utils.h"
-#include "opt/dominator_analysis.h"
-#include "opt/pass.h"
+#include "gmock/gmock.h"
+#include "source/opt/dominator_analysis.h"
+#include "source/opt/pass.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/function_utils.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/dominator_tree/simple.cpp b/test/opt/dominator_tree/simple.cpp
index 36b2932f..d11854d5 100644
--- a/test/opt/dominator_tree/simple.cpp
+++ b/test/opt/dominator_tree/simple.cpp
@@ -12,17 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <memory>
#include <string>
#include <vector>
-#include <gmock/gmock.h>
-
-#include "../assembly_builder.h"
-#include "../function_utils.h"
-#include "../pass_fixture.h"
-#include "../pass_utils.h"
-#include "opt/dominator_analysis.h"
-#include "opt/pass.h"
+#include "gmock/gmock.h"
+#include "source/opt/dominator_analysis.h"
+#include "source/opt/pass.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/function_utils.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/dominator_tree/switch_case_fallthrough.cpp b/test/opt/dominator_tree/switch_case_fallthrough.cpp
index 0ba768a4..d9dd7d16 100644
--- a/test/opt/dominator_tree/switch_case_fallthrough.cpp
+++ b/test/opt/dominator_tree/switch_case_fallthrough.cpp
@@ -12,17 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <memory>
#include <string>
#include <vector>
-#include <gmock/gmock.h>
-
-#include "../assembly_builder.h"
-#include "../function_utils.h"
-#include "../pass_fixture.h"
-#include "../pass_utils.h"
-#include "opt/dominator_analysis.h"
-#include "opt/pass.h"
+#include "gmock/gmock.h"
+#include "source/opt/dominator_analysis.h"
+#include "source/opt/pass.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/function_utils.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/dominator_tree/unreachable_for.cpp b/test/opt/dominator_tree/unreachable_for.cpp
index d346d16d..469e5c14 100644
--- a/test/opt/dominator_tree/unreachable_for.cpp
+++ b/test/opt/dominator_tree/unreachable_for.cpp
@@ -12,17 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <memory>
#include <string>
#include <vector>
-#include <gmock/gmock.h>
-
-#include "../assembly_builder.h"
-#include "../function_utils.h"
-#include "../pass_fixture.h"
-#include "../pass_utils.h"
-#include "opt/dominator_analysis.h"
-#include "opt/pass.h"
+#include "gmock/gmock.h"
+#include "source/opt/dominator_analysis.h"
+#include "source/opt/pass.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/function_utils.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/dominator_tree/unreachable_for_post.cpp b/test/opt/dominator_tree/unreachable_for_post.cpp
index ec6ebd24..8d3e37b4 100644
--- a/test/opt/dominator_tree/unreachable_for_post.cpp
+++ b/test/opt/dominator_tree/unreachable_for_post.cpp
@@ -12,17 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <memory>
#include <string>
#include <vector>
-#include <gmock/gmock.h>
-
-#include "../assembly_builder.h"
-#include "../function_utils.h"
-#include "../pass_fixture.h"
-#include "../pass_utils.h"
-#include "opt/dominator_analysis.h"
-#include "opt/pass.h"
+#include "gmock/gmock.h"
+#include "source/opt/dominator_analysis.h"
+#include "source/opt/pass.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/function_utils.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/eliminate_dead_const_test.cpp b/test/opt/eliminate_dead_const_test.cpp
index 2d1b3695..7fac866c 100644
--- a/test/opt/eliminate_dead_const_test.cpp
+++ b/test/opt/eliminate_dead_const_test.cpp
@@ -12,15 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "assembly_builder.h"
-#include "pass_fixture.h"
-#include "pass_utils.h"
-
#include <algorithm>
#include <cstdarg>
#include <iostream>
#include <sstream>
+#include <string>
#include <unordered_set>
+#include <vector>
+
+#include "test/opt/assembly_builder.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/eliminate_dead_functions_test.cpp b/test/opt/eliminate_dead_functions_test.cpp
index b49b41b0..0a3d490a 100644
--- a/test/opt/eliminate_dead_functions_test.cpp
+++ b/test/opt/eliminate_dead_functions_test.cpp
@@ -12,13 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <string>
#include <vector>
-#include <gmock/gmock.h>
-
-#include "assembly_builder.h"
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include "gmock/gmock.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/feature_manager_test.cpp b/test/opt/feature_manager_test.cpp
index 983e2afb..767376cf 100644
--- a/test/opt/feature_manager_test.cpp
+++ b/test/opt/feature_manager_test.cpp
@@ -12,12 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
#include <algorithm>
+#include <memory>
+#include <string>
-#include "opt/build_module.h"
-#include "opt/ir_context.h"
+#include "gmock/gmock.h"
+#include "gtest/gtest.h"
+#include "source/opt/build_module.h"
+#include "source/opt/ir_context.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/flatten_decoration_test.cpp b/test/opt/flatten_decoration_test.cpp
index 3f0075b2..483ee6e5 100644
--- a/test/opt/flatten_decoration_test.cpp
+++ b/test/opt/flatten_decoration_test.cpp
@@ -13,10 +13,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
+#include <string>
+#include <vector>
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include "gmock/gmock.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/fold_spec_const_op_composite_test.cpp b/test/opt/fold_spec_const_op_composite_test.cpp
index 15e29be3..8ecfd5c7 100644
--- a/test/opt/fold_spec_const_op_composite_test.cpp
+++ b/test/opt/fold_spec_const_op_composite_test.cpp
@@ -12,12 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "assembly_builder.h"
-
#include <sstream>
+#include <string>
+#include <vector>
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/fold_test.cpp b/test/opt/fold_test.cpp
index adbd577e..b1e57588 100644
--- a/test/opt/fold_test.cpp
+++ b/test/opt/fold_test.cpp
@@ -11,24 +11,26 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <limits>
#include <memory>
+#include <string>
#include <unordered_set>
+#include <vector>
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
-#include <opt/fold.h>
+#include "gmock/gmock.h"
+#include "gtest/gtest.h"
+#include "source/opt/build_module.h"
+#include "source/opt/def_use_manager.h"
+#include "source/opt/fold.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/module.h"
+#include "spirv-tools/libspirv.hpp"
+#include "test/opt/pass_utils.h"
#ifdef SPIRV_EFFCEE
#include "effcee/effcee.h"
#endif
-#include "opt/build_module.h"
-#include "opt/def_use_manager.h"
-#include "opt/ir_context.h"
-#include "opt/module.h"
-#include "pass_utils.h"
-#include "spirv-tools/libspirv.hpp"
-
namespace spvtools {
namespace opt {
namespace {
diff --git a/test/opt/freeze_spec_const_test.cpp b/test/opt/freeze_spec_const_test.cpp
index 306f8c57..5cc7843b 100644
--- a/test/opt/freeze_spec_const_test.cpp
+++ b/test/opt/freeze_spec_const_test.cpp
@@ -12,13 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "pass_fixture.h"
-#include "pass_utils.h"
-
#include <algorithm>
+#include <string>
#include <tuple>
+#include <utility>
#include <vector>
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
+
namespace spvtools {
namespace opt {
namespace {
diff --git a/test/opt/function_utils.h b/test/opt/function_utils.h
index 8a1c8579..803cacdd 100644
--- a/test/opt/function_utils.h
+++ b/test/opt/function_utils.h
@@ -15,8 +15,8 @@
#ifndef TEST_OPT_FUNCTION_UTILS_H_
#define TEST_OPT_FUNCTION_UTILS_H_
-#include "opt/function.h"
-#include "opt/module.h"
+#include "source/opt/function.h"
+#include "source/opt/module.h"
namespace spvtest {
diff --git a/test/opt/if_conversion_test.cpp b/test/opt/if_conversion_test.cpp
index 6ad052fa..a62a15e8 100644
--- a/test/opt/if_conversion_test.cpp
+++ b/test/opt/if_conversion_test.cpp
@@ -12,10 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "assembly_builder.h"
+#include <string>
+
#include "gmock/gmock.h"
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/inline_opaque_test.cpp b/test/opt/inline_opaque_test.cpp
index d756a62e..d10913ae 100644
--- a/test/opt/inline_opaque_test.cpp
+++ b/test/opt/inline_opaque_test.cpp
@@ -13,8 +13,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include <string>
+
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/inline_test.cpp b/test/opt/inline_test.cpp
index aaba88c0..4eab77da 100644
--- a/test/opt/inline_test.cpp
+++ b/test/opt/inline_test.cpp
@@ -13,8 +13,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include <memory>
+#include <string>
+#include <vector>
+
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/insert_extract_elim_test.cpp b/test/opt/insert_extract_elim_test.cpp
index 3eae0064..c5169750 100644
--- a/test/opt/insert_extract_elim_test.cpp
+++ b/test/opt/insert_extract_elim_test.cpp
@@ -13,9 +13,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <opt/simplification_pass.h>
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include <string>
+
+#include "source/opt/simplification_pass.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/instruction_list_test.cpp b/test/opt/instruction_list_test.cpp
index 0f8496f4..e745790a 100644
--- a/test/opt/instruction_list_test.cpp
+++ b/test/opt/instruction_list_test.cpp
@@ -14,13 +14,13 @@
#include <algorithm>
#include <memory>
+#include <utility>
#include <vector>
#include "gmock/gmock.h"
#include "gtest/gtest.h"
-
-#include "opt/instruction.h"
-#include "opt/instruction_list.h"
+#include "source/opt/instruction.h"
+#include "source/opt/instruction_list.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/instruction_test.cpp b/test/opt/instruction_test.cpp
index 407b666d..2ace6b8a 100644
--- a/test/opt/instruction_test.cpp
+++ b/test/opt/instruction_test.cpp
@@ -12,15 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "opt/instruction.h"
-#include "opt/ir_context.h"
+#include <memory>
+#include <string>
+#include <vector>
#include "gmock/gmock.h"
-
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include "source/opt/instruction.h"
+#include "source/opt/ir_context.h"
#include "spirv-tools/libspirv.h"
-#include "unit_spirv.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/ir_builder.cpp b/test/opt/ir_builder.cpp
index 5484116e..7eeb86dd 100644
--- a/test/opt/ir_builder.cpp
+++ b/test/opt/ir_builder.cpp
@@ -12,23 +12,24 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
#include <algorithm>
+#include <memory>
+#include <string>
#include <vector>
+#include "gmock/gmock.h"
+#include "gtest/gtest.h"
+#include "source/opt/basic_block.h"
+#include "source/opt/build_module.h"
+#include "source/opt/instruction.h"
+#include "source/opt/ir_builder.h"
+#include "source/opt/type_manager.h"
+#include "spirv-tools/libspirv.hpp"
+
#ifdef SPIRV_EFFCEE
#include "effcee/effcee.h"
#endif
-#include "opt/basic_block.h"
-#include "opt/ir_builder.h"
-
-#include "opt/build_module.h"
-#include "opt/instruction.h"
-#include "opt/type_manager.h"
-#include "spirv-tools/libspirv.hpp"
-
namespace spvtools {
namespace opt {
namespace {
diff --git a/test/opt/ir_context_test.cpp b/test/opt/ir_context_test.cpp
index 5fe68c80..c64e5b04 100644
--- a/test/opt/ir_context_test.cpp
+++ b/test/opt/ir_context_test.cpp
@@ -12,14 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
#include <algorithm>
-
-#include "opt/ir_context.h"
-#include "opt/pass.h"
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include <memory>
+#include <string>
+#include <utility>
+
+#include "gmock/gmock.h"
+#include "gtest/gtest.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/pass.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/ir_loader_test.cpp b/test/opt/ir_loader_test.cpp
index 8e8dd2e8..cb1ddb3c 100644
--- a/test/opt/ir_loader_test.cpp
+++ b/test/opt/ir_loader_test.cpp
@@ -12,13 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gtest/gtest.h>
#include <algorithm>
+#include <memory>
+#include <string>
#include <unordered_set>
+#include <utility>
+#include <vector>
-#include "message.h"
-#include "opt/build_module.h"
-#include "opt/ir_context.h"
+#include "gtest/gtest.h"
+#include "source/message.h"
+#include "source/opt/build_module.h"
+#include "source/opt/ir_context.h"
#include "spirv-tools/libspirv.hpp"
namespace spvtools {
diff --git a/test/opt/iterator_test.cpp b/test/opt/iterator_test.cpp
index 81e8d237..cb262e40 100644
--- a/test/opt/iterator_test.cpp
+++ b/test/opt/iterator_test.cpp
@@ -17,8 +17,8 @@
#include "gmock/gmock.h"
-#include "opt/iterator.h"
-#include "opt/make_unique.h"
+#include "source/opt/iterator.h"
+#include "source/opt/make_unique.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/line_debug_info_test.cpp b/test/opt/line_debug_info_test.cpp
index 729b1443..6a20a013 100644
--- a/test/opt/line_debug_info_test.cpp
+++ b/test/opt/line_debug_info_test.cpp
@@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/local_access_chain_convert_test.cpp b/test/opt/local_access_chain_convert_test.cpp
index b535717a..94456da8 100644
--- a/test/opt/local_access_chain_convert_test.cpp
+++ b/test/opt/local_access_chain_convert_test.cpp
@@ -13,8 +13,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include <string>
+
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/local_redundancy_elimination_test.cpp b/test/opt/local_redundancy_elimination_test.cpp
index 3d26b7e2..bdaafb85 100644
--- a/test/opt/local_redundancy_elimination_test.cpp
+++ b/test/opt/local_redundancy_elimination_test.cpp
@@ -12,13 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "opt/value_number_table.h"
+#include <string>
-#include "assembly_builder.h"
#include "gmock/gmock.h"
-#include "opt/build_module.h"
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include "source/opt/build_module.h"
+#include "source/opt/value_number_table.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/local_single_block_elim.cpp b/test/opt/local_single_block_elim.cpp
index 21e2d29f..29d978a2 100644
--- a/test/opt/local_single_block_elim.cpp
+++ b/test/opt/local_single_block_elim.cpp
@@ -13,8 +13,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include <string>
+
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/local_single_store_elim_test.cpp b/test/opt/local_single_store_elim_test.cpp
index e42c6faf..51bd5d29 100644
--- a/test/opt/local_single_store_elim_test.cpp
+++ b/test/opt/local_single_store_elim_test.cpp
@@ -13,8 +13,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include <string>
+
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/local_ssa_elim_test.cpp b/test/opt/local_ssa_elim_test.cpp
index 2f5d7b52..01a354ad 100644
--- a/test/opt/local_ssa_elim_test.cpp
+++ b/test/opt/local_ssa_elim_test.cpp
@@ -13,8 +13,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include <memory>
+#include <string>
+
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/loop_optimizations/dependence_analysis.cpp b/test/opt/loop_optimizations/dependence_analysis.cpp
index 7c9e88d2..8aeb20af 100644
--- a/test/opt/loop_optimizations/dependence_analysis.cpp
+++ b/test/opt/loop_optimizations/dependence_analysis.cpp
@@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
-
#include <memory>
#include <set>
#include <string>
@@ -21,16 +19,16 @@
#include <utility>
#include <vector>
-#include "../assembly_builder.h"
-#include "../function_utils.h"
-#include "../pass_fixture.h"
-#include "../pass_utils.h"
-
-#include "opt/iterator.h"
-#include "opt/loop_dependence.h"
-#include "opt/loop_descriptor.h"
-#include "opt/pass.h"
-#include "opt/tree_iterator.h"
+#include "gmock/gmock.h"
+#include "source/opt/iterator.h"
+#include "source/opt/loop_dependence.h"
+#include "source/opt/loop_descriptor.h"
+#include "source/opt/pass.h"
+#include "source/opt/tree_iterator.h"
+#include "test/opt//assembly_builder.h"
+#include "test/opt//function_utils.h"
+#include "test/opt//pass_fixture.h"
+#include "test/opt//pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/loop_optimizations/dependence_analysis_helpers.cpp b/test/opt/loop_optimizations/dependence_analysis_helpers.cpp
index 10a41320..715cf541 100644
--- a/test/opt/loop_optimizations/dependence_analysis_helpers.cpp
+++ b/test/opt/loop_optimizations/dependence_analysis_helpers.cpp
@@ -12,24 +12,22 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
-
#include <memory>
#include <string>
#include <unordered_set>
#include <vector>
-#include "../assembly_builder.h"
-#include "../function_utils.h"
-#include "../pass_fixture.h"
-#include "../pass_utils.h"
-
-#include "opt/iterator.h"
-#include "opt/loop_dependence.h"
-#include "opt/loop_descriptor.h"
-#include "opt/pass.h"
-#include "opt/scalar_analysis.h"
-#include "opt/tree_iterator.h"
+#include "gmock/gmock.h"
+#include "source/opt/iterator.h"
+#include "source/opt/loop_dependence.h"
+#include "source/opt/loop_descriptor.h"
+#include "source/opt/pass.h"
+#include "source/opt/scalar_analysis.h"
+#include "source/opt/tree_iterator.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/function_utils.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/loop_optimizations/fusion_compatibility.cpp b/test/opt/loop_optimizations/fusion_compatibility.cpp
index eb284dba..cda8576c 100644
--- a/test/opt/loop_optimizations/fusion_compatibility.cpp
+++ b/test/opt/loop_optimizations/fusion_compatibility.cpp
@@ -12,17 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
-
#include <algorithm>
#include <iterator>
#include <memory>
#include <string>
#include <vector>
-#include "../pass_fixture.h"
-#include "opt/loop_descriptor.h"
-#include "opt/loop_fusion.h"
+#include "gmock/gmock.h"
+#include "source/opt/loop_descriptor.h"
+#include "source/opt/loop_fusion.h"
+#include "test/opt/pass_fixture.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/loop_optimizations/fusion_illegal.cpp b/test/opt/loop_optimizations/fusion_illegal.cpp
index 79121a6b..26d54457 100644
--- a/test/opt/loop_optimizations/fusion_illegal.cpp
+++ b/test/opt/loop_optimizations/fusion_illegal.cpp
@@ -12,17 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
-
#include <algorithm>
#include <iterator>
#include <memory>
#include <string>
#include <vector>
-#include "../pass_fixture.h"
-#include "opt/loop_descriptor.h"
-#include "opt/loop_fusion.h"
+#include "gmock/gmock.h"
+#include "source/opt/loop_descriptor.h"
+#include "source/opt/loop_fusion.h"
+#include "test/opt/pass_fixture.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/loop_optimizations/fusion_legal.cpp b/test/opt/loop_optimizations/fusion_legal.cpp
index 9cc651d9..509516f8 100644
--- a/test/opt/loop_optimizations/fusion_legal.cpp
+++ b/test/opt/loop_optimizations/fusion_legal.cpp
@@ -12,22 +12,21 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
-
#include <algorithm>
#include <iterator>
#include <memory>
#include <string>
#include <vector>
+#include "gmock/gmock.h"
+#include "source/opt/loop_descriptor.h"
+#include "source/opt/loop_fusion.h"
+#include "test/opt/pass_fixture.h"
+
#ifdef SPIRV_EFFCEE
#include "effcee/effcee.h"
#endif
-#include "../pass_fixture.h"
-#include "opt/loop_descriptor.h"
-#include "opt/loop_fusion.h"
-
namespace spvtools {
namespace opt {
namespace {
diff --git a/test/opt/loop_optimizations/fusion_pass.cpp b/test/opt/loop_optimizations/fusion_pass.cpp
index 0cd71902..857ada93 100644
--- a/test/opt/loop_optimizations/fusion_pass.cpp
+++ b/test/opt/loop_optimizations/fusion_pass.cpp
@@ -12,14 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
+#include <string>
+
+#include "gmock/gmock.h"
+#include "test/opt/pass_fixture.h"
#ifdef SPIRV_EFFCEE
#include "effcee/effcee.h"
#endif
-#include "../pass_fixture.h"
-
namespace spvtools {
namespace opt {
namespace {
diff --git a/test/opt/loop_optimizations/hoist_all_loop_types.cpp b/test/opt/loop_optimizations/hoist_all_loop_types.cpp
index 1bf7c5cb..27e0a0d9 100644
--- a/test/opt/loop_optimizations/hoist_all_loop_types.cpp
+++ b/test/opt/loop_optimizations/hoist_all_loop_types.cpp
@@ -14,10 +14,9 @@
#include <string>
-#include <gmock/gmock.h>
-
-#include "../pass_fixture.h"
-#include "opt/licm_pass.h"
+#include "gmock/gmock.h"
+#include "source/opt/licm_pass.h"
+#include "test/opt/pass_fixture.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/loop_optimizations/hoist_double_nested_loops.cpp b/test/opt/loop_optimizations/hoist_double_nested_loops.cpp
index c65a216d..ea194965 100644
--- a/test/opt/loop_optimizations/hoist_double_nested_loops.cpp
+++ b/test/opt/loop_optimizations/hoist_double_nested_loops.cpp
@@ -14,10 +14,9 @@
#include <string>
-#include <gmock/gmock.h>
-
-#include "../pass_fixture.h"
-#include "opt/licm_pass.h"
+#include "gmock/gmock.h"
+#include "source/opt/licm_pass.h"
+#include "test/opt/pass_fixture.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/loop_optimizations/hoist_from_independent_loops.cpp b/test/opt/loop_optimizations/hoist_from_independent_loops.cpp
index 8e7a80b3..abc79e37 100644
--- a/test/opt/loop_optimizations/hoist_from_independent_loops.cpp
+++ b/test/opt/loop_optimizations/hoist_from_independent_loops.cpp
@@ -14,10 +14,9 @@
#include <string>
-#include <gmock/gmock.h>
-
-#include "../pass_fixture.h"
-#include "opt/licm_pass.h"
+#include "gmock/gmock.h"
+#include "source/opt/licm_pass.h"
+#include "test/opt/pass_fixture.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/loop_optimizations/hoist_simple_case.cpp b/test/opt/loop_optimizations/hoist_simple_case.cpp
index db981323..e973d9d2 100644
--- a/test/opt/loop_optimizations/hoist_simple_case.cpp
+++ b/test/opt/loop_optimizations/hoist_simple_case.cpp
@@ -14,10 +14,9 @@
#include <string>
-#include <gmock/gmock.h>
-
-#include "../pass_fixture.h"
-#include "opt/licm_pass.h"
+#include "gmock/gmock.h"
+#include "source/opt/licm_pass.h"
+#include "test/opt/pass_fixture.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/loop_optimizations/hoist_single_nested_loops.cpp b/test/opt/loop_optimizations/hoist_single_nested_loops.cpp
index 07baab26..7fa1fb0a 100644
--- a/test/opt/loop_optimizations/hoist_single_nested_loops.cpp
+++ b/test/opt/loop_optimizations/hoist_single_nested_loops.cpp
@@ -14,10 +14,9 @@
#include <string>
-#include <gmock/gmock.h>
-
-#include "../pass_fixture.h"
-#include "opt/licm_pass.h"
+#include "gmock/gmock.h"
+#include "source/opt/licm_pass.h"
+#include "test/opt/pass_fixture.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/loop_optimizations/hoist_without_preheader.cpp b/test/opt/loop_optimizations/hoist_without_preheader.cpp
index e69afd2c..9e8d02fa 100644
--- a/test/opt/loop_optimizations/hoist_without_preheader.cpp
+++ b/test/opt/loop_optimizations/hoist_without_preheader.cpp
@@ -14,10 +14,9 @@
#include <string>
-#include <gmock/gmock.h>
-
-#include "../pass_fixture.h"
-#include "opt/licm_pass.h"
+#include "gmock/gmock.h"
+#include "source/opt/licm_pass.h"
+#include "test/opt/pass_fixture.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/loop_optimizations/lcssa.cpp b/test/opt/loop_optimizations/lcssa.cpp
index 0f0bd0bb..22077265 100644
--- a/test/opt/loop_optimizations/lcssa.cpp
+++ b/test/opt/loop_optimizations/lcssa.cpp
@@ -12,24 +12,22 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
-
#include <memory>
#include <string>
#include <vector>
+#include "gmock/gmock.h"
+#include "source/opt/build_module.h"
+#include "source/opt/loop_descriptor.h"
+#include "source/opt/loop_utils.h"
+#include "source/opt/pass.h"
+#include "test/opt//assembly_builder.h"
+#include "test/opt/function_utils.h"
+
#ifdef SPIRV_EFFCEE
#include "effcee/effcee.h"
#endif
-#include "../assembly_builder.h"
-#include "../function_utils.h"
-
-#include "opt/build_module.h"
-#include "opt/loop_descriptor.h"
-#include "opt/loop_utils.h"
-#include "opt/pass.h"
-
namespace spvtools {
namespace opt {
namespace {
diff --git a/test/opt/loop_optimizations/loop_descriptions.cpp b/test/opt/loop_optimizations/loop_descriptions.cpp
index c55f1263..91dbdc6b 100644
--- a/test/opt/loop_optimizations/loop_descriptions.cpp
+++ b/test/opt/loop_optimizations/loop_descriptions.cpp
@@ -12,18 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
-
#include <memory>
#include <string>
#include <vector>
-#include "../assembly_builder.h"
-#include "../function_utils.h"
-#include "../pass_fixture.h"
-#include "../pass_utils.h"
-#include "opt/loop_descriptor.h"
-#include "opt/pass.h"
+#include "gmock/gmock.h"
+#include "source/opt/loop_descriptor.h"
+#include "source/opt/pass.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/function_utils.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/loop_optimizations/loop_fission.cpp b/test/opt/loop_optimizations/loop_fission.cpp
index 6fc95a56..e513f425 100644
--- a/test/opt/loop_optimizations/loop_fission.cpp
+++ b/test/opt/loop_optimizations/loop_fission.cpp
@@ -12,19 +12,19 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <memory>
#include <string>
#include <vector>
-#include <gmock/gmock.h>
-
-#include "../assembly_builder.h"
-#include "../function_utils.h"
-#include "../pass_fixture.h"
-#include "../pass_utils.h"
-#include "opt/loop_fission.h"
-#include "opt/loop_unroller.h"
-#include "opt/loop_utils.h"
-#include "opt/pass.h"
+#include "gmock/gmock.h"
+#include "source/opt/loop_fission.h"
+#include "source/opt/loop_unroller.h"
+#include "source/opt/loop_utils.h"
+#include "source/opt/pass.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/function_utils.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/loop_optimizations/nested_loops.cpp b/test/opt/loop_optimizations/nested_loops.cpp
index 062044af..651cdef4 100644
--- a/test/opt/loop_optimizations/nested_loops.cpp
+++ b/test/opt/loop_optimizations/nested_loops.cpp
@@ -12,22 +12,20 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
-
#include <memory>
#include <string>
#include <unordered_set>
#include <vector>
-#include "../assembly_builder.h"
-#include "../function_utils.h"
-#include "../pass_fixture.h"
-#include "../pass_utils.h"
-
-#include "opt/iterator.h"
-#include "opt/loop_descriptor.h"
-#include "opt/pass.h"
-#include "opt/tree_iterator.h"
+#include "gmock/gmock.h"
+#include "source/opt/iterator.h"
+#include "source/opt/loop_descriptor.h"
+#include "source/opt/pass.h"
+#include "source/opt/tree_iterator.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/function_utils.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/loop_optimizations/peeling.cpp b/test/opt/loop_optimizations/peeling.cpp
index cd1e49ce..e5db20b4 100644
--- a/test/opt/loop_optimizations/peeling.cpp
+++ b/test/opt/loop_optimizations/peeling.cpp
@@ -12,17 +12,20 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
+#include <memory>
+#include <string>
+#include <vector>
+
+#include "gmock/gmock.h"
+#include "source/opt/ir_builder.h"
+#include "source/opt/loop_descriptor.h"
+#include "source/opt/loop_peeling.h"
+#include "test/opt/pass_fixture.h"
#ifdef SPIRV_EFFCEE
#include "effcee/effcee.h"
#endif
-#include "../pass_fixture.h"
-#include "opt/ir_builder.h"
-#include "opt/loop_descriptor.h"
-#include "opt/loop_peeling.h"
-
namespace spvtools {
namespace opt {
namespace {
diff --git a/test/opt/loop_optimizations/peeling_pass.cpp b/test/opt/loop_optimizations/peeling_pass.cpp
index 47e7914c..284ad838 100644
--- a/test/opt/loop_optimizations/peeling_pass.cpp
+++ b/test/opt/loop_optimizations/peeling_pass.cpp
@@ -12,12 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
-
-#include "../pass_fixture.h"
-#include "opt/ir_builder.h"
-#include "opt/loop_descriptor.h"
-#include "opt/loop_peeling.h"
+#include <string>
+#include <utility>
+#include <vector>
+
+#include "gmock/gmock.h"
+#include "source/opt/ir_builder.h"
+#include "source/opt/loop_descriptor.h"
+#include "source/opt/loop_peeling.h"
+#include "test/opt/pass_fixture.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/loop_optimizations/unroll_assumptions.cpp b/test/opt/loop_optimizations/unroll_assumptions.cpp
index be55c773..62f77d78 100644
--- a/test/opt/loop_optimizations/unroll_assumptions.cpp
+++ b/test/opt/loop_optimizations/unroll_assumptions.cpp
@@ -12,18 +12,18 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <memory>
#include <string>
#include <vector>
-#include <gmock/gmock.h>
-
-#include "../assembly_builder.h"
-#include "../function_utils.h"
-#include "../pass_fixture.h"
-#include "../pass_utils.h"
-#include "opt/loop_unroller.h"
-#include "opt/loop_utils.h"
-#include "opt/pass.h"
+#include "gmock/gmock.h"
+#include "source/opt/loop_unroller.h"
+#include "source/opt/loop_utils.h"
+#include "source/opt/pass.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/function_utils.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/loop_optimizations/unroll_simple.cpp b/test/opt/loop_optimizations/unroll_simple.cpp
index 26cb07ff..3b01fdc3 100644
--- a/test/opt/loop_optimizations/unroll_simple.cpp
+++ b/test/opt/loop_optimizations/unroll_simple.cpp
@@ -12,18 +12,18 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <memory>
#include <string>
#include <vector>
-#include <gmock/gmock.h>
-
-#include "../assembly_builder.h"
-#include "../function_utils.h"
-#include "../pass_fixture.h"
-#include "../pass_utils.h"
-#include "opt/loop_unroller.h"
-#include "opt/loop_utils.h"
-#include "opt/pass.h"
+#include "gmock/gmock.h"
+#include "source/opt/loop_unroller.h"
+#include "source/opt/loop_utils.h"
+#include "source/opt/pass.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/function_utils.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/loop_optimizations/unswitch.cpp b/test/opt/loop_optimizations/unswitch.cpp
index 5082d234..96a7fc01 100644
--- a/test/opt/loop_optimizations/unswitch.cpp
+++ b/test/opt/loop_optimizations/unswitch.cpp
@@ -12,14 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
+#include <string>
+
+#include "gmock/gmock.h"
+#include "test/opt/pass_fixture.h"
#ifdef SPIRV_EFFCEE
#include "effcee/effcee.h"
#endif
-#include "../pass_fixture.h"
-
namespace spvtools {
namespace opt {
namespace {
diff --git a/test/opt/module_test.cpp b/test/opt/module_test.cpp
index 3270e40b..cc795850 100644
--- a/test/opt/module_test.cpp
+++ b/test/opt/module_test.cpp
@@ -12,18 +12,18 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <memory>
#include <sstream>
+#include <string>
#include <vector>
#include "gmock/gmock.h"
#include "gtest/gtest.h"
-
-#include "message.h"
-#include "opt/build_module.h"
-#include "opt/module.h"
+#include "source/message.h"
+#include "source/opt/build_module.h"
+#include "source/opt/module.h"
#include "spirv-tools/libspirv.hpp"
-
-#include "module_utils.h"
+#include "test/opt/module_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/module_utils.h b/test/opt/module_utils.h
index 80c2ecf9..007f132c 100644
--- a/test/opt/module_utils.h
+++ b/test/opt/module_utils.h
@@ -16,7 +16,7 @@
#define TEST_OPT_MODULE_UTILS_H_
#include <vector>
-#include "opt/module.h"
+#include "source/opt/module.h"
namespace spvtest {
diff --git a/test/opt/optimizer_test.cpp b/test/opt/optimizer_test.cpp
index 0c2a3741..4b948afd 100644
--- a/test/opt/optimizer_test.cpp
+++ b/test/opt/optimizer_test.cpp
@@ -12,12 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
+#include <string>
+#include <vector>
+#include "gmock/gmock.h"
#include "spirv-tools/libspirv.hpp"
#include "spirv-tools/optimizer.hpp"
-
-#include "pass_fixture.h"
+#include "test/opt/pass_fixture.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/pass_fixture.h b/test/opt/pass_fixture.h
index 4877121a..50de7b82 100644
--- a/test/opt/pass_fixture.h
+++ b/test/opt/pass_fixture.h
@@ -16,22 +16,23 @@
#define TEST_OPT_PASS_FIXTURE_H_
#include <iostream>
+#include <memory>
#include <string>
#include <tuple>
+#include <utility>
#include <vector>
-#include <gtest/gtest.h>
+#include "gtest/gtest.h"
+#include "source/opt/build_module.h"
+#include "source/opt/make_unique.h"
+#include "source/opt/pass_manager.h"
+#include "source/opt/passes.h"
+#include "spirv-tools/libspirv.hpp"
#ifdef SPIRV_EFFCEE
#include "effcee/effcee.h"
#endif
-#include "opt/build_module.h"
-#include "opt/make_unique.h"
-#include "opt/pass_manager.h"
-#include "opt/passes.h"
-#include "spirv-tools/libspirv.hpp"
-
namespace spvtools {
namespace opt {
diff --git a/test/opt/pass_manager_test.cpp b/test/opt/pass_manager_test.cpp
index 3bb24b8c..8330a13e 100644
--- a/test/opt/pass_manager_test.cpp
+++ b/test/opt/pass_manager_test.cpp
@@ -12,13 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "gmock/gmock.h"
-
#include <initializer_list>
+#include <memory>
+#include <string>
+#include <utility>
+#include <vector>
-#include "module_utils.h"
-#include "opt/make_unique.h"
-#include "pass_fixture.h"
+#include "gmock/gmock.h"
+#include "source/opt/make_unique.h"
+#include "test/opt/module_utils.h"
+#include "test/opt/pass_fixture.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/pass_merge_return_test.cpp b/test/opt/pass_merge_return_test.cpp
index 52411eb2..5b2f6c65 100644
--- a/test/opt/pass_merge_return_test.cpp
+++ b/test/opt/pass_merge_return_test.cpp
@@ -12,13 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
+#include <string>
+#include "gmock/gmock.h"
#include "spirv-tools/libspirv.hpp"
#include "spirv-tools/optimizer.hpp"
-
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/pass_remove_duplicates_test.cpp b/test/opt/pass_remove_duplicates_test.cpp
index 53e5f5e5..16fcd4b8 100644
--- a/test/opt/pass_remove_duplicates_test.cpp
+++ b/test/opt/pass_remove_duplicates_test.cpp
@@ -13,15 +13,17 @@
// limitations under the License.
#include <iostream>
+#include <memory>
+#include <string>
+#include <vector>
-#include <gmock/gmock.h>
-
+#include "gmock/gmock.h"
#include "source/opt/build_module.h"
#include "source/opt/ir_context.h"
#include "source/opt/pass_manager.h"
#include "source/opt/remove_duplicates_pass.h"
#include "source/spirv_constant.h"
-#include "unit_spirv.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/pass_test.cpp b/test/opt/pass_test.cpp
index bfbe00ea..bce05b67 100644
--- a/test/opt/pass_test.cpp
+++ b/test/opt/pass_test.cpp
@@ -12,15 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <memory>
#include <string>
#include <vector>
-#include <gmock/gmock.h>
-
-#include "assembly_builder.h"
-#include "opt/pass.h"
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include "gmock/gmock.h"
+#include "source/opt/pass.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/pass_utils.cpp b/test/opt/pass_utils.cpp
index 2f9ce1d3..ceb99961 100644
--- a/test/opt/pass_utils.cpp
+++ b/test/opt/pass_utils.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "pass_utils.h"
+#include "test/opt/pass_utils.h"
#include <algorithm>
#include <sstream>
diff --git a/test/opt/pass_utils.h b/test/opt/pass_utils.h
index c95b86fc..37406842 100644
--- a/test/opt/pass_utils.h
+++ b/test/opt/pass_utils.h
@@ -15,6 +15,7 @@
#ifndef TEST_OPT_PASS_UTILS_H_
#define TEST_OPT_PASS_UTILS_H_
+#include <algorithm>
#include <functional>
#include <iterator>
#include <string>
diff --git a/test/opt/private_to_local_test.cpp b/test/opt/private_to_local_test.cpp
index b0f73d84..d7eb37e5 100644
--- a/test/opt/private_to_local_test.cpp
+++ b/test/opt/private_to_local_test.cpp
@@ -12,13 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "opt/value_number_table.h"
+#include <string>
-#include "assembly_builder.h"
#include "gmock/gmock.h"
-#include "opt/build_module.h"
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include "source/opt/build_module.h"
+#include "source/opt/value_number_table.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/propagator_test.cpp b/test/opt/propagator_test.cpp
index d90b970f..fb8e487c 100644
--- a/test/opt/propagator_test.cpp
+++ b/test/opt/propagator_test.cpp
@@ -12,14 +12,18 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
-
-#include "opt/build_module.h"
-#include "opt/cfg.h"
-#include "opt/ir_context.h"
-#include "opt/pass.h"
-#include "opt/propagator.h"
+#include <map>
+#include <memory>
+#include <string>
+#include <vector>
+
+#include "gmock/gmock.h"
+#include "gtest/gtest.h"
+#include "source/opt/build_module.h"
+#include "source/opt/cfg.h"
+#include "source/opt/ir_context.h"
+#include "source/opt/pass.h"
+#include "source/opt/propagator.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/reduce_load_size_test.cpp b/test/opt/reduce_load_size_test.cpp
index d694ff90..1d367e10 100644
--- a/test/opt/reduce_load_size_test.cpp
+++ b/test/opt/reduce_load_size_test.cpp
@@ -12,8 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include <string>
+
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/redundancy_elimination_test.cpp b/test/opt/redundancy_elimination_test.cpp
index 39c6f568..a6e8c4f2 100644
--- a/test/opt/redundancy_elimination_test.cpp
+++ b/test/opt/redundancy_elimination_test.cpp
@@ -12,13 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "opt/value_number_table.h"
+#include <string>
-#include "assembly_builder.h"
#include "gmock/gmock.h"
-#include "opt/build_module.h"
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include "source/opt/build_module.h"
+#include "source/opt/value_number_table.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/register_liveness.cpp b/test/opt/register_liveness.cpp
index ec0a8ee9..cb973d2e 100644
--- a/test/opt/register_liveness.cpp
+++ b/test/opt/register_liveness.cpp
@@ -12,17 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
-
#include <memory>
#include <string>
+#include <unordered_set>
#include <vector>
-#include "assembly_builder.h"
-#include "function_utils.h"
-#include "opt/register_pressure.h"
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include "gmock/gmock.h"
+#include "source/opt/register_pressure.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/function_utils.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/replace_invalid_opc_test.cpp b/test/opt/replace_invalid_opc_test.cpp
index 8da830c0..adfe2ee1 100644
--- a/test/opt/replace_invalid_opc_test.cpp
+++ b/test/opt/replace_invalid_opc_test.cpp
@@ -12,11 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "assembly_builder.h"
-#include "gmock/gmock.h"
-#include "pass_fixture.h"
-
#include <cstdarg>
+#include <string>
+#include <vector>
+
+#include "gmock/gmock.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/pass_fixture.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/scalar_analysis.cpp b/test/opt/scalar_analysis.cpp
index 0d76b3da..598d8c7b 100644
--- a/test/opt/scalar_analysis.cpp
+++ b/test/opt/scalar_analysis.cpp
@@ -12,23 +12,21 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
-
#include <memory>
#include <string>
#include <unordered_set>
#include <vector>
-#include "assembly_builder.h"
-#include "function_utils.h"
-#include "pass_fixture.h"
-#include "pass_utils.h"
-
-#include "opt/iterator.h"
-#include "opt/loop_descriptor.h"
-#include "opt/pass.h"
-#include "opt/scalar_analysis.h"
-#include "opt/tree_iterator.h"
+#include "gmock/gmock.h"
+#include "source/opt/iterator.h"
+#include "source/opt/loop_descriptor.h"
+#include "source/opt/pass.h"
+#include "source/opt/scalar_analysis.h"
+#include "source/opt/tree_iterator.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/function_utils.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/scalar_replacement_test.cpp b/test/opt/scalar_replacement_test.cpp
index bd3ce609..652978bb 100644
--- a/test/opt/scalar_replacement_test.cpp
+++ b/test/opt/scalar_replacement_test.cpp
@@ -12,10 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "assembly_builder.h"
+#include <string>
+
#include "gmock/gmock.h"
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/set_spec_const_default_value_test.cpp b/test/opt/set_spec_const_default_value_test.cpp
index b415a654..161674fe 100644
--- a/test/opt/set_spec_const_default_value_test.cpp
+++ b/test/opt/set_spec_const_default_value_test.cpp
@@ -12,9 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "pass_fixture.h"
+#include <vector>
-#include <gmock/gmock.h>
+#include "gmock/gmock.h"
+#include "test/opt/pass_fixture.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/simplification_test.cpp b/test/opt/simplification_test.cpp
index 40248ea0..b5ad2679 100644
--- a/test/opt/simplification_test.cpp
+++ b/test/opt/simplification_test.cpp
@@ -12,11 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "opt/simplification_pass.h"
+#include <string>
-#include "assembly_builder.h"
#include "gmock/gmock.h"
-#include "pass_fixture.h"
+#include "source/opt/simplification_pass.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/pass_fixture.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/strength_reduction_test.cpp b/test/opt/strength_reduction_test.cpp
index 69313aa6..654c90df 100644
--- a/test/opt/strength_reduction_test.cpp
+++ b/test/opt/strength_reduction_test.cpp
@@ -12,16 +12,18 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "assembly_builder.h"
-#include "gmock/gmock.h"
-#include "pass_fixture.h"
-#include "pass_utils.h"
-
#include <algorithm>
#include <cstdarg>
#include <iostream>
#include <sstream>
+#include <string>
#include <unordered_set>
+#include <vector>
+
+#include "gmock/gmock.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/strip_debug_info_test.cpp b/test/opt/strip_debug_info_test.cpp
index ff1d4167..f40ed382 100644
--- a/test/opt/strip_debug_info_test.cpp
+++ b/test/opt/strip_debug_info_test.cpp
@@ -12,8 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include <vector>
+
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/strip_reflect_info_test.cpp b/test/opt/strip_reflect_info_test.cpp
index 08c6668a..088cac7a 100644
--- a/test/opt/strip_reflect_info_test.cpp
+++ b/test/opt/strip_reflect_info_test.cpp
@@ -12,8 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include <string>
+
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/type_manager_test.cpp b/test/opt/type_manager_test.cpp
index f77536cb..cf1fcb58 100644
--- a/test/opt/type_manager_test.cpp
+++ b/test/opt/type_manager_test.cpp
@@ -12,18 +12,22 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
+#include <memory>
+#include <string>
+#include <utility>
+#include <vector>
+
+#include "gmock/gmock.h"
+#include "gtest/gtest.h"
+#include "source/opt/build_module.h"
+#include "source/opt/instruction.h"
+#include "source/opt/type_manager.h"
+#include "spirv-tools/libspirv.hpp"
#ifdef SPIRV_EFFCEE
#include "effcee/effcee.h"
#endif
-#include "opt/build_module.h"
-#include "opt/instruction.h"
-#include "opt/type_manager.h"
-#include "spirv-tools/libspirv.hpp"
-
namespace spvtools {
namespace opt {
namespace analysis {
diff --git a/test/opt/types_test.cpp b/test/opt/types_test.cpp
index 192cb164..69a1d96b 100644
--- a/test/opt/types_test.cpp
+++ b/test/opt/types_test.cpp
@@ -13,12 +13,12 @@
// limitations under the License.
#include <memory>
+#include <utility>
#include <vector>
-#include <gtest/gtest.h>
-
-#include "opt/make_unique.h"
-#include "opt/types.h"
+#include "gtest/gtest.h"
+#include "source/opt/make_unique.h"
+#include "source/opt/types.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/unify_const_test.cpp b/test/opt/unify_const_test.cpp
index d277ce4e..37728cc2 100644
--- a/test/opt/unify_const_test.cpp
+++ b/test/opt/unify_const_test.cpp
@@ -12,11 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <string>
+#include <tuple>
#include <unordered_set>
+#include <utility>
+#include <vector>
-#include "assembly_builder.h"
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/utils_test.cpp b/test/opt/utils_test.cpp
index 893deb88..9bb82a36 100644
--- a/test/opt/utils_test.cpp
+++ b/test/opt/utils_test.cpp
@@ -12,9 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gtest/gtest.h>
+#include <string>
+#include <vector>
-#include "pass_utils.h"
+#include "gtest/gtest.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/value_table_test.cpp b/test/opt/value_table_test.cpp
index 6ea8e14b..ef338ae7 100644
--- a/test/opt/value_table_test.cpp
+++ b/test/opt/value_table_test.cpp
@@ -12,12 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "opt/value_number_table.h"
+#include <string>
-#include "assembly_builder.h"
#include "gmock/gmock.h"
-#include "opt/build_module.h"
-#include "pass_fixture.h"
+#include "source/opt/build_module.h"
+#include "source/opt/value_number_table.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/pass_fixture.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/vector_dce_test.cpp b/test/opt/vector_dce_test.cpp
index a69bfd1d..d1af0de1 100644
--- a/test/opt/vector_dce_test.cpp
+++ b/test/opt/vector_dce_test.cpp
@@ -12,8 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "pass_fixture.h"
-#include "pass_utils.h"
+#include <string>
+
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
namespace spvtools {
namespace opt {
diff --git a/test/opt/workaround1209_test.cpp b/test/opt/workaround1209_test.cpp
index 23a8b2ea..853a01cb 100644
--- a/test/opt/workaround1209_test.cpp
+++ b/test/opt/workaround1209_test.cpp
@@ -12,17 +12,18 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "assembly_builder.h"
-#include "gmock/gmock.h"
-#include "pass_fixture.h"
-#include "pass_utils.h"
-
#include <algorithm>
#include <cstdarg>
#include <iostream>
#include <sstream>
+#include <string>
#include <unordered_set>
+#include "gmock/gmock.h"
+#include "test/opt/assembly_builder.h"
+#include "test/opt/pass_fixture.h"
+#include "test/opt/pass_utils.h"
+
namespace spvtools {
namespace opt {
namespace {
diff --git a/test/parse_number_test.cpp b/test/parse_number_test.cpp
index 284002da..c99205cf 100644
--- a/test/parse_number_test.cpp
+++ b/test/parse_number_test.cpp
@@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <limits>
#include <string>
#include <vector>
diff --git a/test/preserve_numeric_ids_test.cpp b/test/preserve_numeric_ids_test.cpp
index aa738725..1c3354d5 100644
--- a/test/preserve_numeric_ids_test.cpp
+++ b/test/preserve_numeric_ids_test.cpp
@@ -18,7 +18,7 @@
#include "source/text.h"
#include "source/text_handler.h"
-#include "test_fixture.h"
+#include "test/test_fixture.h"
namespace spvtools {
namespace {
diff --git a/test/software_version_test.cpp b/test/software_version_test.cpp
index 634c254a..80b944a3 100644
--- a/test/software_version_test.cpp
+++ b/test/software_version_test.cpp
@@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "unit_spirv.h"
-
#include <sstream>
+#include <string>
#include "gmock/gmock.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/stats/stats_aggregate_test.cpp b/test/stats/stats_aggregate_test.cpp
index 7071f5a3..c94de280 100644
--- a/test/stats/stats_aggregate_test.cpp
+++ b/test/stats/stats_aggregate_test.cpp
@@ -15,10 +15,11 @@
// Tests for unique type declaration rules validator.
#include <string>
+#include <unordered_map>
#include "source/spirv_stats.h"
-#include "test_fixture.h"
-#include "unit_spirv.h"
+#include "test/test_fixture.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/stats/stats_analyzer_test.cpp b/test/stats/stats_analyzer_test.cpp
index 7d5f2f9c..53a414c5 100644
--- a/test/stats/stats_analyzer_test.cpp
+++ b/test/stats/stats_analyzer_test.cpp
@@ -17,8 +17,8 @@
#include <sstream>
#include <string>
-#include "latest_version_spirv_header.h"
-#include "test_fixture.h"
+#include "source/latest_version_spirv_header.h"
+#include "test/test_fixture.h"
#include "tools/stats/stats_analyzer.h"
namespace spvtools {
diff --git a/test/target_env_test.cpp b/test/target_env_test.cpp
index 4740a2d7..f9624646 100644
--- a/test/target_env_test.cpp
+++ b/test/target_env_test.cpp
@@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <gmock/gmock.h>
-
-#include "unit_spirv.h"
+#include <vector>
+#include "gmock/gmock.h"
#include "source/spirv_target_env.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/test_fixture.h b/test/test_fixture.h
index 56659d9e..e85015c9 100644
--- a/test/test_fixture.h
+++ b/test/test_fixture.h
@@ -15,7 +15,10 @@
#ifndef TEST_TEST_FIXTURE_H_
#define TEST_TEST_FIXTURE_H_
-#include "unit_spirv.h"
+#include <string>
+#include <vector>
+
+#include "test/unit_spirv.h"
namespace spvtest {
diff --git a/test/text_advance_test.cpp b/test/text_advance_test.cpp
index ebbe2157..9de77a83 100644
--- a/test/text_advance_test.cpp
+++ b/test/text_advance_test.cpp
@@ -12,7 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "unit_spirv.h"
+#include <string>
+
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/text_destroy_test.cpp b/test/text_destroy_test.cpp
index 1c5b7397..4c2837ba 100644
--- a/test/text_destroy_test.cpp
+++ b/test/text_destroy_test.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "unit_spirv.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/text_literal_test.cpp b/test/text_literal_test.cpp
index 74f43735..fe419913 100644
--- a/test/text_literal_test.cpp
+++ b/test/text_literal_test.cpp
@@ -12,13 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "unit_spirv.h"
+#include <string>
+#include <utility>
+#include <vector>
#include "gmock/gmock.h"
-#include "message.h"
-#include "test_fixture.h"
-
-#include <string>
+#include "source/message.h"
+#include "test/test_fixture.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/text_start_new_inst_test.cpp b/test/text_start_new_inst_test.cpp
index 75615677..ff35ac84 100644
--- a/test/text_start_new_inst_test.cpp
+++ b/test/text_start_new_inst_test.cpp
@@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "unit_spirv.h"
-
#include <string>
+#include "test/unit_spirv.h"
+
namespace spvtools {
namespace {
diff --git a/test/text_to_binary.annotation_test.cpp b/test/text_to_binary.annotation_test.cpp
index 27df121f..7aec9055 100644
--- a/test/text_to_binary.annotation_test.cpp
+++ b/test/text_to_binary.annotation_test.cpp
@@ -15,13 +15,14 @@
// Assembler tests for instructions in the "Annotation" section of the
// SPIR-V spec.
-#include "unit_spirv.h"
-
#include <sstream>
+#include <string>
#include <tuple>
+#include <vector>
#include "gmock/gmock.h"
-#include "test_fixture.h"
+#include "test/test_fixture.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/text_to_binary.barrier_test.cpp b/test/text_to_binary.barrier_test.cpp
index f3723aa8..545d26ff 100644
--- a/test/text_to_binary.barrier_test.cpp
+++ b/test/text_to_binary.barrier_test.cpp
@@ -15,10 +15,11 @@
// Assembler tests for instructions in the "Barrier Instructions" section
// of the SPIR-V spec.
-#include "unit_spirv.h"
+#include <string>
#include "gmock/gmock.h"
-#include "test_fixture.h"
+#include "test/test_fixture.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/text_to_binary.constant_test.cpp b/test/text_to_binary.constant_test.cpp
index d110e79f..1a24b528 100644
--- a/test/text_to_binary.constant_test.cpp
+++ b/test/text_to_binary.constant_test.cpp
@@ -15,13 +15,14 @@
// Assembler tests for instructions in the "Group Instrucions" section of the
// SPIR-V spec.
-#include "unit_spirv.h"
-
#include <cstdint>
#include <limits>
+#include <string>
+#include <vector>
#include "gmock/gmock.h"
-#include "test_fixture.h"
+#include "test/test_fixture.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/text_to_binary.control_flow_test.cpp b/test/text_to_binary.control_flow_test.cpp
index df838675..07f11088 100644
--- a/test/text_to_binary.control_flow_test.cpp
+++ b/test/text_to_binary.control_flow_test.cpp
@@ -16,13 +16,13 @@
// SPIR-V spec.
#include <sstream>
+#include <string>
#include <tuple>
#include <vector>
-#include "unit_spirv.h"
-
#include "gmock/gmock.h"
-#include "test_fixture.h"
+#include "test/test_fixture.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/text_to_binary.debug_test.cpp b/test/text_to_binary.debug_test.cpp
index 9f5f0682..b85650e5 100644
--- a/test/text_to_binary.debug_test.cpp
+++ b/test/text_to_binary.debug_test.cpp
@@ -15,12 +15,12 @@
// Assembler tests for instructions in the "Debug" section of the
// SPIR-V spec.
-#include "unit_spirv.h"
-
#include <string>
+#include <vector>
#include "gmock/gmock.h"
-#include "test_fixture.h"
+#include "test/test_fixture.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/text_to_binary.device_side_enqueue_test.cpp b/test/text_to_binary.device_side_enqueue_test.cpp
index 06f5aafb..25c100b8 100644
--- a/test/text_to_binary.device_side_enqueue_test.cpp
+++ b/test/text_to_binary.device_side_enqueue_test.cpp
@@ -15,10 +15,12 @@
// Assembler tests for instructions in the "Device-Side Enqueue Instructions"
// section of the SPIR-V spec.
-#include "unit_spirv.h"
+#include <string>
+#include <vector>
#include "gmock/gmock.h"
-#include "test_fixture.h"
+#include "test/test_fixture.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/text_to_binary.extension_test.cpp b/test/text_to_binary.extension_test.cpp
index cb595cb5..0d8d324b 100644
--- a/test/text_to_binary.extension_test.cpp
+++ b/test/text_to_binary.extension_test.cpp
@@ -15,12 +15,15 @@
// Assembler tests for instructions in the "Extension Instruction" section
// of the SPIR-V spec.
-#include "unit_spirv.h"
+#include <string>
+#include <tuple>
+#include <vector>
#include "gmock/gmock.h"
-#include "latest_version_glsl_std_450_header.h"
-#include "latest_version_opencl_std_header.h"
-#include "test_fixture.h"
+#include "source/latest_version_glsl_std_450_header.h"
+#include "source/latest_version_opencl_std_header.h"
+#include "test/test_fixture.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/text_to_binary.function_test.cpp b/test/text_to_binary.function_test.cpp
index ddd5461c..748461fb 100644
--- a/test/text_to_binary.function_test.cpp
+++ b/test/text_to_binary.function_test.cpp
@@ -15,10 +15,12 @@
// Assembler tests for instructions in the "Function" section of the
// SPIR-V spec.
-#include "unit_spirv.h"
+#include <string>
+#include <vector>
#include "gmock/gmock.h"
-#include "test_fixture.h"
+#include "test/test_fixture.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/text_to_binary.group_test.cpp b/test/text_to_binary.group_test.cpp
index 07887621..2f4b76d2 100644
--- a/test/text_to_binary.group_test.cpp
+++ b/test/text_to_binary.group_test.cpp
@@ -15,10 +15,12 @@
// Assembler tests for instructions in the "Group Instrucions" section of the
// SPIR-V spec.
-#include "unit_spirv.h"
+#include <string>
+#include <vector>
#include "gmock/gmock.h"
-#include "test_fixture.h"
+#include "test/test_fixture.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/text_to_binary.image_test.cpp b/test/text_to_binary.image_test.cpp
index 3463e4bc..c1adedf4 100644
--- a/test/text_to_binary.image_test.cpp
+++ b/test/text_to_binary.image_test.cpp
@@ -15,10 +15,12 @@
// Assembler tests for instructions in the "Image Instructions" section of
// the SPIR-V spec.
-#include "unit_spirv.h"
+#include <string>
+#include <vector>
#include "gmock/gmock.h"
-#include "test_fixture.h"
+#include "test/test_fixture.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/text_to_binary.literal_test.cpp b/test/text_to_binary.literal_test.cpp
index ce1f4ee0..bcbb63e0 100644
--- a/test/text_to_binary.literal_test.cpp
+++ b/test/text_to_binary.literal_test.cpp
@@ -14,7 +14,9 @@
// Assembler tests for literal numbers and literal strings.
-#include "test_fixture.h"
+#include <string>
+
+#include "test/test_fixture.h"
namespace spvtools {
namespace {
diff --git a/test/text_to_binary.memory_test.cpp b/test/text_to_binary.memory_test.cpp
index 38da78c8..ead08e6f 100644
--- a/test/text_to_binary.memory_test.cpp
+++ b/test/text_to_binary.memory_test.cpp
@@ -15,12 +15,13 @@
// Assembler tests for instructions in the "Memory Instructions" section of
// the SPIR-V spec.
-#include "unit_spirv.h"
-
#include <sstream>
+#include <string>
+#include <vector>
#include "gmock/gmock.h"
-#include "test_fixture.h"
+#include "test/test_fixture.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/text_to_binary.misc_test.cpp b/test/text_to_binary.misc_test.cpp
index bf524571..03b1e091 100644
--- a/test/text_to_binary.misc_test.cpp
+++ b/test/text_to_binary.misc_test.cpp
@@ -15,10 +15,10 @@
// Assembler tests for instructions in the "Miscellaneous" section of the
// SPIR-V spec.
-#include "unit_spirv.h"
+#include "test/unit_spirv.h"
#include "gmock/gmock.h"
-#include "test_fixture.h"
+#include "test/test_fixture.h"
namespace spvtools {
namespace {
diff --git a/test/text_to_binary.mode_setting_test.cpp b/test/text_to_binary.mode_setting_test.cpp
index ad4629b9..ed4fa2fb 100644
--- a/test/text_to_binary.mode_setting_test.cpp
+++ b/test/text_to_binary.mode_setting_test.cpp
@@ -15,10 +15,13 @@
// Assembler tests for instructions in the "Mode-Setting" section of the
// SPIR-V spec.
-#include "unit_spirv.h"
+#include <string>
+#include <tuple>
+#include <vector>
#include "gmock/gmock.h"
-#include "test_fixture.h"
+#include "test/test_fixture.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/text_to_binary.pipe_storage_test.cpp b/test/text_to_binary.pipe_storage_test.cpp
index ca3daf7f..f74dbcfd 100644
--- a/test/text_to_binary.pipe_storage_test.cpp
+++ b/test/text_to_binary.pipe_storage_test.cpp
@@ -13,7 +13,7 @@
// limitations under the License.
#include "gmock/gmock.h"
-#include "test_fixture.h"
+#include "test/test_fixture.h"
namespace spvtools {
namespace {
diff --git a/test/text_to_binary.reserved_sampling_test.cpp b/test/text_to_binary.reserved_sampling_test.cpp
index 54baf246..42e4e2ae 100644
--- a/test/text_to_binary.reserved_sampling_test.cpp
+++ b/test/text_to_binary.reserved_sampling_test.cpp
@@ -14,10 +14,11 @@
// Validation tests for illegal instructions
-#include "unit_spirv.h"
+#include <string>
#include "gmock/gmock.h"
-#include "test_fixture.h"
+#include "test/test_fixture.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/text_to_binary.subgroup_dispatch_test.cpp b/test/text_to_binary.subgroup_dispatch_test.cpp
index 10aa77cf..967e3c38 100644
--- a/test/text_to_binary.subgroup_dispatch_test.cpp
+++ b/test/text_to_binary.subgroup_dispatch_test.cpp
@@ -15,10 +15,10 @@
// Assembler tests for instructions in the "Barrier Instructions" section
// of the SPIR-V spec.
-#include "unit_spirv.h"
+#include "test/unit_spirv.h"
#include "gmock/gmock.h"
-#include "test_fixture.h"
+#include "test/test_fixture.h"
namespace spvtools {
namespace {
diff --git a/test/text_to_binary.type_declaration_test.cpp b/test/text_to_binary.type_declaration_test.cpp
index c4e7f7e0..c6f158f2 100644
--- a/test/text_to_binary.type_declaration_test.cpp
+++ b/test/text_to_binary.type_declaration_test.cpp
@@ -15,10 +15,12 @@
// Assembler tests for instructions in the "Type-Declaration" section of the
// SPIR-V spec.
-#include "unit_spirv.h"
+#include <string>
+#include <vector>
#include "gmock/gmock.h"
-#include "test_fixture.h"
+#include "test/test_fixture.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/text_to_binary_test.cpp b/test/text_to_binary_test.cpp
index 4c2ad586..4ba37ad4 100644
--- a/test/text_to_binary_test.cpp
+++ b/test/text_to_binary_test.cpp
@@ -14,16 +14,16 @@
#include <algorithm>
#include <cstring>
+#include <string>
#include <utility>
#include <vector>
#include "gmock/gmock.h"
-
#include "source/spirv_constant.h"
#include "source/util/bitutils.h"
#include "source/util/hex_float.h"
-#include "test_fixture.h"
-#include "unit_spirv.h"
+#include "test/test_fixture.h"
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/text_word_get_test.cpp b/test/text_word_get_test.cpp
index 54e84932..b74a680f 100644
--- a/test/text_word_get_test.cpp
+++ b/test/text_word_get_test.cpp
@@ -12,7 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "unit_spirv.h"
+#include <string>
+
+#include "test/unit_spirv.h"
namespace spvtools {
namespace {
diff --git a/test/unit_spirv.cpp b/test/unit_spirv.cpp
index 807f89c7..84ed87a5 100644
--- a/test/unit_spirv.cpp
+++ b/test/unit_spirv.cpp
@@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "unit_spirv.h"
+#include "test/unit_spirv.h"
#include "gmock/gmock.h"
-#include "test_fixture.h"
+#include "test/test_fixture.h"
namespace spvtools {
namespace {
diff --git a/test/unit_spirv.h b/test/unit_spirv.h
index fdcfacf9..22442888 100644
--- a/test/unit_spirv.h
+++ b/test/unit_spirv.h
@@ -18,8 +18,10 @@
#include <stdint.h>
#include <iomanip>
+#include <string>
#include <vector>
+#include "gtest/gtest.h"
#include "source/assembly_grammar.h"
#include "source/binary.h"
#include "source/diagnostic.h"
@@ -31,8 +33,6 @@
#include "source/val/validate.h"
#include "spirv-tools/libspirv.h"
-#include <gtest/gtest.h>
-
#ifdef __ANDROID__
#include <sstream>
namespace std {
diff --git a/test/util/bit_vector_test.cpp b/test/util/bit_vector_test.cpp
index 76ec560d..8d967f8f 100644
--- a/test/util/bit_vector_test.cpp
+++ b/test/util/bit_vector_test.cpp
@@ -16,7 +16,7 @@
#include "gmock/gmock.h"
-#include "util/bit_vector.h"
+#include "source/util/bit_vector.h"
namespace spvtools {
namespace utils {
diff --git a/test/util/ilist_test.cpp b/test/util/ilist_test.cpp
index 987d7466..4a546f99 100644
--- a/test/util/ilist_test.cpp
+++ b/test/util/ilist_test.cpp
@@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <utility>
#include <vector>
#include "gmock/gmock.h"
-
-#include "util/ilist.h"
+#include "source/util/ilist.h"
namespace spvtools {
namespace utils {
diff --git a/test/util/small_vector_test.cpp b/test/util/small_vector_test.cpp
index 3460fdcc..01d7df18 100644
--- a/test/util/small_vector_test.cpp
+++ b/test/util/small_vector_test.cpp
@@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <utility>
#include <vector>
#include "gmock/gmock.h"
-
-#include "util/small_vector.h"
+#include "source/util/small_vector.h"
namespace spvtools {
namespace utils {
diff --git a/test/val/val_adjacency_test.cpp b/test/val/val_adjacency_test.cpp
index 431f9b7d..d6283051 100644
--- a/test/val/val_adjacency_test.cpp
+++ b/test/val/val_adjacency_test.cpp
@@ -16,8 +16,8 @@
#include <string>
#include "gmock/gmock.h"
-#include "unit_spirv.h"
-#include "val_fixtures.h"
+#include "test/unit_spirv.h"
+#include "test/val/val_fixtures.h"
namespace spvtools {
namespace val {
diff --git a/test/val/val_arithmetics_test.cpp b/test/val/val_arithmetics_test.cpp
index 73174e29..1c8d88be 100644
--- a/test/val/val_arithmetics_test.cpp
+++ b/test/val/val_arithmetics_test.cpp
@@ -17,8 +17,8 @@
#include <string>
#include "gmock/gmock.h"
-#include "unit_spirv.h"
-#include "val_fixtures.h"
+#include "test/unit_spirv.h"
+#include "test/val/val_fixtures.h"
namespace spvtools {
namespace val {
diff --git a/test/val/val_atomics_test.cpp b/test/val/val_atomics_test.cpp
index a2b42361..9aece39a 100644
--- a/test/val/val_atomics_test.cpp
+++ b/test/val/val_atomics_test.cpp
@@ -16,8 +16,8 @@
#include <string>
#include "gmock/gmock.h"
-#include "unit_spirv.h"
-#include "val_fixtures.h"
+#include "test/unit_spirv.h"
+#include "test/val/val_fixtures.h"
namespace spvtools {
namespace val {
diff --git a/test/val/val_barriers_test.cpp b/test/val/val_barriers_test.cpp
index cf88ac22..710504ec 100644
--- a/test/val/val_barriers_test.cpp
+++ b/test/val/val_barriers_test.cpp
@@ -16,8 +16,8 @@
#include <string>
#include "gmock/gmock.h"
-#include "unit_spirv.h"
-#include "val_fixtures.h"
+#include "test/unit_spirv.h"
+#include "test/val/val_fixtures.h"
namespace spvtools {
namespace val {
diff --git a/test/val/val_bitwise_test.cpp b/test/val/val_bitwise_test.cpp
index e14ebfa0..18ccd4f8 100644
--- a/test/val/val_bitwise_test.cpp
+++ b/test/val/val_bitwise_test.cpp
@@ -17,8 +17,8 @@
#include <string>
#include "gmock/gmock.h"
-#include "unit_spirv.h"
-#include "val_fixtures.h"
+#include "test/unit_spirv.h"
+#include "test/val/val_fixtures.h"
namespace spvtools {
namespace val {
diff --git a/test/val/val_builtins_test.cpp b/test/val/val_builtins_test.cpp
index acfcdcd8..0c8909ce 100644
--- a/test/val/val_builtins_test.cpp
+++ b/test/val/val_builtins_test.cpp
@@ -20,10 +20,12 @@
#include <sstream>
#include <string>
#include <tuple>
+#include <utility>
+#include <vector>
#include "gmock/gmock.h"
-#include "unit_spirv.h"
-#include "val_fixtures.h"
+#include "test/unit_spirv.h"
+#include "test/val/val_fixtures.h"
namespace spvtools {
namespace val {
diff --git a/test/val/val_capability_test.cpp b/test/val/val_capability_test.cpp
index b1d6dc31..2ee7133c 100644
--- a/test/val/val_capability_test.cpp
+++ b/test/val/val_capability_test.cpp
@@ -18,14 +18,14 @@
#include <string>
#include <tuple>
#include <utility>
+#include <vector>
-#include <gmock/gmock.h>
-
+#include "gmock/gmock.h"
#include "source/assembly_grammar.h"
-#include "spirv_target_env.h"
-#include "test_fixture.h"
-#include "unit_spirv.h"
-#include "val_fixtures.h"
+#include "source/spirv_target_env.h"
+#include "test/test_fixture.h"
+#include "test/unit_spirv.h"
+#include "test/val/val_fixtures.h"
namespace spvtools {
namespace val {
diff --git a/test/val/val_cfg_test.cpp b/test/val/val_cfg_test.cpp
index 9f48a0c1..14d098dd 100644
--- a/test/val/val_cfg_test.cpp
+++ b/test/val/val_cfg_test.cpp
@@ -26,9 +26,9 @@
#include "source/diagnostic.h"
#include "source/val/validate.h"
-#include "test_fixture.h"
-#include "unit_spirv.h"
-#include "val_fixtures.h"
+#include "test/test_fixture.h"
+#include "test/unit_spirv.h"
+#include "test/val/val_fixtures.h"
namespace spvtools {
namespace val {
diff --git a/test/val/val_composites_test.cpp b/test/val/val_composites_test.cpp
index 4b21db53..429007b0 100644
--- a/test/val/val_composites_test.cpp
+++ b/test/val/val_composites_test.cpp
@@ -16,8 +16,8 @@
#include <string>
#include "gmock/gmock.h"
-#include "unit_spirv.h"
-#include "val_fixtures.h"
+#include "test/unit_spirv.h"
+#include "test/val/val_fixtures.h"
namespace spvtools {
namespace val {
diff --git a/test/val/val_conversion_test.cpp b/test/val/val_conversion_test.cpp
index 3fb6d294..e0b8a001 100644
--- a/test/val/val_conversion_test.cpp
+++ b/test/val/val_conversion_test.cpp
@@ -17,8 +17,8 @@
#include <string>
#include "gmock/gmock.h"
-#include "unit_spirv.h"
-#include "val_fixtures.h"
+#include "test/unit_spirv.h"
+#include "test/val/val_fixtures.h"
namespace spvtools {
namespace val {
diff --git a/test/val/val_data_test.cpp b/test/val/val_data_test.cpp
index 916f9827..ecb31746 100644
--- a/test/val/val_data_test.cpp
+++ b/test/val/val_data_test.cpp
@@ -19,8 +19,8 @@
#include <utility>
#include "gmock/gmock.h"
-#include "unit_spirv.h"
-#include "val_fixtures.h"
+#include "test/unit_spirv.h"
+#include "test/val/val_fixtures.h"
namespace spvtools {
namespace val {
diff --git a/test/val/val_decoration_test.cpp b/test/val/val_decoration_test.cpp
index d2905ae9..5591aa44 100644
--- a/test/val/val_decoration_test.cpp
+++ b/test/val/val_decoration_test.cpp
@@ -14,10 +14,13 @@
// Validation tests for decorations
+#include <string>
+#include <vector>
+
#include "gmock/gmock.h"
#include "source/val/decoration.h"
-#include "unit_spirv.h"
-#include "val_fixtures.h"
+#include "test/unit_spirv.h"
+#include "test/val/val_fixtures.h"
namespace spvtools {
namespace val {
diff --git a/test/val/val_derivatives_test.cpp b/test/val/val_derivatives_test.cpp
index 1d8519f6..93a70e87 100644
--- a/test/val/val_derivatives_test.cpp
+++ b/test/val/val_derivatives_test.cpp
@@ -16,8 +16,8 @@
#include <string>
#include "gmock/gmock.h"
-#include "unit_spirv.h"
-#include "val_fixtures.h"
+#include "test/unit_spirv.h"
+#include "test/val/val_fixtures.h"
namespace spvtools {
namespace val {
diff --git a/test/val/val_explicit_reserved_test.cpp b/test/val/val_explicit_reserved_test.cpp
index 67356c93..f01e933f 100644
--- a/test/val/val_explicit_reserved_test.cpp
+++ b/test/val/val_explicit_reserved_test.cpp
@@ -14,10 +14,11 @@
// Validation tests for illegal instructions
-#include "unit_spirv.h"
+#include <string>
#include "gmock/gmock.h"
-#include "val_fixtures.h"
+#include "test/unit_spirv.h"
+#include "test/val/val_fixtures.h"
namespace spvtools {
namespace val {
diff --git a/test/val/val_ext_inst_test.cpp b/test/val/val_ext_inst_test.cpp
index e3c3311c..40126fd9 100644
--- a/test/val/val_ext_inst_test.cpp
+++ b/test/val/val_ext_inst_test.cpp
@@ -18,10 +18,11 @@
#include <sstream>
#include <string>
+#include <vector>
#include "gmock/gmock.h"
-#include "unit_spirv.h"
-#include "val_fixtures.h"
+#include "test/unit_spirv.h"
+#include "test/val/val_fixtures.h"
namespace spvtools {
namespace val {
diff --git a/test/val/val_extensions_test.cpp b/test/val/val_extensions_test.cpp
index 328e22ac..b185c3ca 100644
--- a/test/val/val_extensions_test.cpp
+++ b/test/val/val_extensions_test.cpp
@@ -15,14 +15,15 @@
// Tests for OpExtension validator rules.
#include <string>
+#include <vector>
-#include "enum_string_mapping.h"
-#include "extensions.h"
#include "gmock/gmock.h"
-#include "spirv_target_env.h"
-#include "test_fixture.h"
-#include "unit_spirv.h"
-#include "val_fixtures.h"
+#include "source/enum_string_mapping.h"
+#include "source/extensions.h"
+#include "source/spirv_target_env.h"
+#include "test/test_fixture.h"
+#include "test/unit_spirv.h"
+#include "test/val/val_fixtures.h"
namespace spvtools {
namespace val {
diff --git a/test/val/val_fixtures.h b/test/val/val_fixtures.h
index 0c19fba0..73a0cc62 100644
--- a/test/val/val_fixtures.h
+++ b/test/val/val_fixtures.h
@@ -17,9 +17,12 @@
#ifndef TEST_VAL_VAL_FIXTURES_H_
#define TEST_VAL_VAL_FIXTURES_H_
+#include <memory>
+#include <string>
+
#include "source/val/validation_state.h"
-#include "test_fixture.h"
-#include "unit_spirv.h"
+#include "test/test_fixture.h"
+#include "test/unit_spirv.h"
namespace spvtest {
diff --git a/test/val/val_id_test.cpp b/test/val/val_id_test.cpp
index 09f1239e..6bdba1d4 100644
--- a/test/val/val_id_test.cpp
+++ b/test/val/val_id_test.cpp
@@ -14,11 +14,12 @@
#include <sstream>
#include <string>
+#include <vector>
#include "gmock/gmock.h"
-#include "test_fixture.h"
-#include "unit_spirv.h"
-#include "val_fixtures.h"
+#include "test/test_fixture.h"
+#include "test/unit_spirv.h"
+#include "test/val/val_fixtures.h"
// NOTE: The tests in this file are ONLY testing ID usage, there for the input
// SPIR-V does not follow the logical layout rules from the spec in all cases in
diff --git a/test/val/val_image_test.cpp b/test/val/val_image_test.cpp
index 522d4c90..d281327e 100644
--- a/test/val/val_image_test.cpp
+++ b/test/val/val_image_test.cpp
@@ -18,8 +18,8 @@
#include <string>
#include "gmock/gmock.h"
-#include "unit_spirv.h"
-#include "val_fixtures.h"
+#include "test/unit_spirv.h"
+#include "test/val/val_fixtures.h"
namespace spvtools {
namespace val {
diff --git a/test/val/val_interfaces_test.cpp b/test/val/val_interfaces_test.cpp
index 220a6c5d..b673a040 100644
--- a/test/val/val_interfaces_test.cpp
+++ b/test/val/val_interfaces_test.cpp
@@ -12,9 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <string>
+
#include "gmock/gmock.h"
-#include "unit_spirv.h"
-#include "val_fixtures.h"
+#include "test/unit_spirv.h"
+#include "test/val/val_fixtures.h"
namespace spvtools {
namespace val {
diff --git a/test/val/val_layout_test.cpp b/test/val/val_layout_test.cpp
index 353337eb..145c5439 100644
--- a/test/val/val_layout_test.cpp
+++ b/test/val/val_layout_test.cpp
@@ -14,15 +14,18 @@
// Validation tests for Logical Layout
+#include <algorithm>
#include <functional>
#include <sstream>
#include <string>
+#include <tuple>
#include <utility>
+#include <vector>
#include "gmock/gmock.h"
#include "source/diagnostic.h"
-#include "unit_spirv.h"
-#include "val_fixtures.h"
+#include "test/unit_spirv.h"
+#include "test/val/val_fixtures.h"
namespace spvtools {
namespace val {
diff --git a/test/val/val_limits_test.cpp b/test/val/val_limits_test.cpp
index 40fb1dce..55bf1e5f 100644
--- a/test/val/val_limits_test.cpp
+++ b/test/val/val_limits_test.cpp
@@ -19,8 +19,8 @@
#include <utility>
#include "gmock/gmock.h"
-#include "unit_spirv.h"
-#include "val_fixtures.h"
+#include "test/unit_spirv.h"
+#include "test/val/val_fixtures.h"
namespace spvtools {
namespace val {
diff --git a/test/val/val_literals_test.cpp b/test/val/val_literals_test.cpp
index 39a082bc..cbdbdd10 100644
--- a/test/val/val_literals_test.cpp
+++ b/test/val/val_literals_test.cpp
@@ -18,7 +18,7 @@
#include <utility>
#include "gmock/gmock.h"
-#include "val_fixtures.h"
+#include "test/val/val_fixtures.h"
namespace spvtools {
namespace val {
diff --git a/test/val/val_logicals_test.cpp b/test/val/val_logicals_test.cpp
index 4c415580..449cdd54 100644
--- a/test/val/val_logicals_test.cpp
+++ b/test/val/val_logicals_test.cpp
@@ -17,8 +17,8 @@
#include <string>
#include "gmock/gmock.h"
-#include "unit_spirv.h"
-#include "val_fixtures.h"
+#include "test/unit_spirv.h"
+#include "test/val/val_fixtures.h"
namespace spvtools {
namespace val {
diff --git a/test/val/val_non_uniform_test.cpp b/test/val/val_non_uniform_test.cpp
index 47e20bda..6ff5c127 100644
--- a/test/val/val_non_uniform_test.cpp
+++ b/test/val/val_non_uniform_test.cpp
@@ -14,10 +14,11 @@
#include <sstream>
#include <string>
+#include <tuple>
#include "gmock/gmock.h"
-#include "unit_spirv.h"
-#include "val_fixtures.h"
+#include "test/unit_spirv.h"
+#include "test/val/val_fixtures.h"
namespace spvtools {
namespace val {
diff --git a/test/val/val_primitives_test.cpp b/test/val/val_primitives_test.cpp
index 993846bd..f02ba805 100644
--- a/test/val/val_primitives_test.cpp
+++ b/test/val/val_primitives_test.cpp
@@ -16,8 +16,8 @@
#include <string>
#include "gmock/gmock.h"
-#include "unit_spirv.h"
-#include "val_fixtures.h"
+#include "test/unit_spirv.h"
+#include "test/val/val_fixtures.h"
namespace spvtools {
namespace val {
diff --git a/test/val/val_ssa_test.cpp b/test/val/val_ssa_test.cpp
index b82bd220..25944f51 100644
--- a/test/val/val_ssa_test.cpp
+++ b/test/val/val_ssa_test.cpp
@@ -19,8 +19,8 @@
#include <utility>
#include "gmock/gmock.h"
-#include "unit_spirv.h"
-#include "val_fixtures.h"
+#include "test/unit_spirv.h"
+#include "test/val/val_fixtures.h"
namespace spvtools {
namespace val {
diff --git a/test/val/val_state_test.cpp b/test/val/val_state_test.cpp
index a344f4da..699b224a 100644
--- a/test/val/val_state_test.cpp
+++ b/test/val/val_state_test.cpp
@@ -18,15 +18,15 @@
#include <vector>
#include "gtest/gtest.h"
-#include "latest_version_spirv_header.h"
-
-#include "enum_set.h"
-#include "extensions.h"
-#include "spirv_validator_options.h"
-#include "val/construct.h"
-#include "val/function.h"
-#include "val/validation_state.h"
-#include "val/validate.h"
+#include "source/latest_version_spirv_header.h"
+
+#include "source/enum_set.h"
+#include "source/extensions.h"
+#include "source/spirv_validator_options.h"
+#include "source/val/construct.h"
+#include "source/val/function.h"
+#include "source/val/validate.h"
+#include "source/val/validation_state.h"
namespace spvtools {
namespace val {
diff --git a/test/val/val_storage_test.cpp b/test/val/val_storage_test.cpp
index 0f05dccc..46b3ddcb 100644
--- a/test/val/val_storage_test.cpp
+++ b/test/val/val_storage_test.cpp
@@ -19,7 +19,7 @@
#include <tuple>
#include "gmock/gmock.h"
-#include "val_fixtures.h"
+#include "test/val/val_fixtures.h"
namespace spvtools {
namespace val {
diff --git a/test/val/val_type_unique_test.cpp b/test/val/val_type_unique_test.cpp
index 7215c1d6..67ceaddb 100644
--- a/test/val/val_type_unique_test.cpp
+++ b/test/val/val_type_unique_test.cpp
@@ -17,8 +17,8 @@
#include <string>
#include "gmock/gmock.h"
-#include "unit_spirv.h"
-#include "val_fixtures.h"
+#include "test/unit_spirv.h"
+#include "test/val/val_fixtures.h"
namespace spvtools {
namespace val {
diff --git a/test/val/val_validation_state_test.cpp b/test/val/val_validation_state_test.cpp
index 79cc06e1..68504c52 100644
--- a/test/val/val_validation_state_test.cpp
+++ b/test/val/val_validation_state_test.cpp
@@ -17,9 +17,9 @@
#include <string>
#include "gmock/gmock.h"
-#include "spirv_validator_options.h"
-#include "unit_spirv.h"
-#include "val_fixtures.h"
+#include "source/spirv_validator_options.h"
+#include "test/unit_spirv.h"
+#include "test/val/val_fixtures.h"
namespace spvtools {
namespace val {
diff --git a/test/val/val_version_test.cpp b/test/val/val_version_test.cpp
index 58f47897..fa252ac8 100644
--- a/test/val/val_version_test.cpp
+++ b/test/val/val_version_test.cpp
@@ -12,8 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <string>
+#include <tuple>
+
#include "gmock/gmock.h"
-#include "val_fixtures.h"
+#include "test/val/val_fixtures.h"
namespace spvtools {
namespace val {
diff --git a/test/val/val_webgpu_test.cpp b/test/val/val_webgpu_test.cpp
index a45c9401..b65d08fe 100644
--- a/test/val/val_webgpu_test.cpp
+++ b/test/val/val_webgpu_test.cpp
@@ -14,9 +14,10 @@
// Validation tests for WebGPU env specific checks
-#include <gmock/gmock.h>
+#include <string>
-#include "val_fixtures.h"
+#include "gmock/gmock.h"
+#include "test/val/val_fixtures.h"
namespace spvtools {
namespace val {
diff --git a/tools/cfg/bin_to_dot.cpp b/tools/cfg/bin_to_dot.cpp
index 05facb9d..2561eea4 100644
--- a/tools/cfg/bin_to_dot.cpp
+++ b/tools/cfg/bin_to_dot.cpp
@@ -12,15 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "bin_to_dot.h"
+#include "tools/cfg/bin_to_dot.h"
#include <cassert>
#include <iostream>
#include <utility>
#include <vector>
-#include "assembly_grammar.h"
-#include "name_mapper.h"
+#include "source/assembly_grammar.h"
+#include "source/name_mapper.h"
namespace {
diff --git a/tools/cfg/bin_to_dot.h b/tools/cfg/bin_to_dot.h
index 1007ea71..4de2e07f 100644
--- a/tools/cfg/bin_to_dot.h
+++ b/tools/cfg/bin_to_dot.h
@@ -16,6 +16,7 @@
#define TOOLS_CFG_BIN_TO_DOT_H_
#include <iostream>
+
#include "spirv-tools/libspirv.h"
// Dumps the control flow graph for the given module to the output stream.
diff --git a/tools/cfg/cfg.cpp b/tools/cfg/cfg.cpp
index 2d0bcfae..9e2c448b 100644
--- a/tools/cfg/cfg.cpp
+++ b/tools/cfg/cfg.cpp
@@ -19,10 +19,9 @@
#include <vector>
#include "spirv-tools/libspirv.h"
+#include "tools/cfg/bin_to_dot.h"
#include "tools/io.h"
-#include "bin_to_dot.h"
-
// Prints a program usage message to stdout.
static void print_usage(const char* argv0) {
printf(
diff --git a/tools/comp/markv.cpp b/tools/comp/markv.cpp
index 960e9638..9a0a5180 100644
--- a/tools/comp/markv.cpp
+++ b/tools/comp/markv.cpp
@@ -19,13 +19,15 @@
#include <functional>
#include <iostream>
#include <memory>
+#include <string>
+#include <utility>
#include <vector>
-#include "markv_model_factory.h"
#include "source/comp/markv.h"
#include "source/spirv_target_env.h"
#include "source/table.h"
#include "spirv-tools/optimizer.hpp"
+#include "tools/comp/markv_model_factory.h"
#include "tools/io.h"
namespace {
diff --git a/tools/comp/markv_model_factory.cpp b/tools/comp/markv_model_factory.cpp
index 35b7ba99..dac9bd54 100644
--- a/tools/comp/markv_model_factory.cpp
+++ b/tools/comp/markv_model_factory.cpp
@@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "markv_model_factory.h"
+#include "tools/comp/markv_model_factory.h"
-#include "markv_model_shader.h"
+#include "tools/comp/markv_model_shader.h"
namespace spvtools {
namespace comp {
diff --git a/tools/comp/markv_model_shader.cpp b/tools/comp/markv_model_shader.cpp
index 36627522..6f64ec0f 100644
--- a/tools/comp/markv_model_shader.cpp
+++ b/tools/comp/markv_model_shader.cpp
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "markv_model_shader.h"
+#include "tools/comp/markv_model_shader.h"
#include <algorithm>
#include <map>
@@ -53,7 +53,7 @@ inline uint32_t CombineOpcodeAndNumOperands(uint32_t opcode,
// --codegen_literal_string_huffman_codecs --codegen_non_id_word_huffman_codecs
// --codegen_id_descriptor_huffman_codecs -o
// ~/SPIRV-Tools/source/comp/markv_autogen.inc
-#include "markv_model_shader_default_autogen.inc"
+#include "tools/comp/markv_model_shader_default_autogen.inc"
} // namespace
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp
index 5f68bd0b..97ecbb38 100644
--- a/tools/opt/opt.cpp
+++ b/tools/opt/opt.cpp
@@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include <spirv_validator_options.h>
#include <algorithm>
#include <cassert>
#include <cstring>
@@ -20,14 +19,15 @@
#include <iostream>
#include <memory>
#include <sstream>
+#include <string>
#include <vector>
-#include "opt/log.h"
-#include "opt/loop_peeling.h"
-#include "opt/set_spec_constant_default_value_pass.h"
+#include "source/message.h"
+#include "source/opt/log.h"
+#include "source/opt/loop_peeling.h"
+#include "source/opt/set_spec_constant_default_value_pass.h"
+#include "source/spirv_validator_options.h"
#include "spirv-tools/optimizer.hpp"
-
-#include "message.h"
#include "tools/io.h"
namespace {
diff --git a/tools/stats/stats.cpp b/tools/stats/stats.cpp
index 2b862437..0c7399d3 100644
--- a/tools/stats/stats.cpp
+++ b/tools/stats/stats.cpp
@@ -17,12 +17,13 @@
#include <fstream>
#include <iostream>
#include <unordered_map>
+#include <vector>
#include "source/spirv_stats.h"
#include "source/table.h"
#include "spirv-tools/libspirv.h"
-#include "stats_analyzer.h"
#include "tools/io.h"
+#include "tools/stats/stats_analyzer.h"
using spvtools::SpirvStats;
diff --git a/tools/stats/stats_analyzer.cpp b/tools/stats/stats_analyzer.cpp
index 613b97d4..20eaf24c 100644
--- a/tools/stats/stats_analyzer.cpp
+++ b/tools/stats/stats_analyzer.cpp
@@ -12,20 +12,23 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "stats_analyzer.h"
+#include "tools/stats/stats_analyzer.h"
#include <algorithm>
#include <cassert>
#include <cstring>
#include <iostream>
+#include <map>
#include <sstream>
+#include <string>
#include <unordered_map>
#include <unordered_set>
+#include <utility>
#include <vector>
-#include "latest_version_spirv_header.h"
#include "source/comp/markv_model.h"
#include "source/enum_string_mapping.h"
+#include "source/latest_version_spirv_header.h"
#include "source/opcode.h"
#include "source/operand.h"
#include "source/spirv_constant.h"
diff --git a/tools/stats/stats_analyzer.h b/tools/stats/stats_analyzer.h
index 2b246b50..c7889f37 100644
--- a/tools/stats/stats_analyzer.h
+++ b/tools/stats/stats_analyzer.h
@@ -15,6 +15,7 @@
#ifndef TOOLS_STATS_STATS_ANALYZER_H_
#define TOOLS_STATS_STATS_ANALYZER_H_
+#include <string>
#include <unordered_map>
#include "source/spirv_stats.h"