1//==--- DiagnosticSerializationKinds.td - serialization diagnostics -------===// 2// 3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4// See https://llvm.org/LICENSE.txt for license information. 5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6// 7//===----------------------------------------------------------------------===// 8 9let Component = "Serialization" in { 10let CategoryName = "AST Deserialization Issue" in { 11 12def err_fe_unable_to_read_pch_file : Error< 13 "unable to read PCH file %0: '%1'">; 14def err_fe_not_a_pch_file : Error< 15 "input is not a PCH file: '%0'">; 16def err_fe_pch_malformed : Error< 17 "malformed or corrupted AST file: '%0'">, DefaultFatal; 18def err_fe_pch_malformed_block : Error< 19 "malformed block record in PCH file: '%0'">, DefaultFatal; 20def err_fe_ast_file_modified : Error< 21 "file '%0' has been modified since the " 22 "%select{precompiled header|module file|AST file}1 '%2' was built" 23 ": %select{size|mtime|content}3 changed%select{| (was %5, now %6)}4">, 24 DefaultFatal; 25def err_fe_pch_file_overridden : Error< 26 "file '%0' from the precompiled header has been overridden">; 27def note_pch_required_by : Note<"'%0' required by '%1'">; 28def note_pch_rebuild_required : Note<"please rebuild precompiled header '%0'">; 29def note_module_cache_path : Note< 30 "after modifying system headers, please delete the module cache at '%0'">; 31 32def err_pch_targetopt_mismatch : Error< 33 "PCH file was compiled for the %0 '%1' but the current translation " 34 "unit is being compiled for target '%2'">; 35def err_pch_targetopt_feature_mismatch : Error< 36 "%select{AST file was|current translation unit is}0 compiled with the target " 37 "feature '%1' but the %select{current translation unit is|AST file was}0 " 38 "not">; 39def err_pch_langopt_mismatch : Error<"%0 was %select{disabled|enabled}1 in " 40 "PCH file but is currently %select{disabled|enabled}2">; 41def err_pch_langopt_value_mismatch : Error< 42 "%0 differs in PCH file vs. current file">; 43def err_pch_diagopt_mismatch : Error<"%0 is currently enabled, but was not in " 44 "the PCH file">; 45def err_pch_modulecache_mismatch : Error<"PCH was compiled with module cache " 46 "path '%0', but the path is currently '%1'">; 47 48def err_pch_version_too_old : Error< 49 "PCH file uses an older PCH format that is no longer supported">; 50def err_pch_version_too_new : Error< 51 "PCH file uses a newer PCH format that cannot be read">; 52def err_pch_different_branch : Error< 53 "PCH file built from a different branch (%0) than the compiler (%1)">; 54def err_pch_with_compiler_errors : Error< 55 "PCH file contains compiler errors">; 56 57def err_module_file_conflict : Error< 58 "module '%0' is defined in both '%1' and '%2'">, DefaultFatal; 59def err_ast_file_not_found : Error< 60 "%select{PCH|module|AST}0 file '%1' not found%select{|: %3}2">, DefaultFatal; 61def err_ast_file_out_of_date : Error< 62 "%select{PCH|module|AST}0 file '%1' is out of date and " 63 "needs to be rebuilt%select{|: %3}2">, DefaultFatal; 64def err_ast_file_invalid : Error< 65 "file '%1' is not a valid precompiled %select{PCH|module|AST}0 file: %2">, DefaultFatal; 66def note_module_file_imported_by : Note< 67 "imported by %select{|module '%2' in }1'%0'">; 68def err_module_file_not_module : Error< 69 "AST file '%0' was not built as a module">, DefaultFatal; 70def err_module_file_missing_top_level_submodule : Error< 71 "module file '%0' is missing its top-level submodule">, DefaultFatal; 72def note_module_file_conflict : Note< 73 "this is generally caused by modules with the same name found in multiple " 74 "paths">; 75 76def remark_module_import : Remark< 77 "importing module '%0'%select{| into '%3'}2 from '%1'">, 78 ShowInSystemHeader, 79 InGroup<ModuleImport>; 80 81def err_imported_module_not_found : Error< 82 "module '%0' in AST file '%1' %select{(imported by AST file '%2') |}4" 83 "is not defined in any loaded module map file; " 84 "maybe you need to load '%3'?">, DefaultFatal; 85def note_imported_by_pch_module_not_found : Note< 86 "consider adding '%0' to the header search path">; 87def err_imported_module_modmap_changed : Error< 88 "module '%0' %select{in|imported by}4 AST file '%1' found in a different module map file" 89 " (%2) than when the importing AST file was built (%3)">, DefaultFatal; 90def err_imported_module_relocated : Error< 91 "module '%0' was built in directory '%1' but now resides in " 92 "directory '%2'">, DefaultFatal; 93def err_module_different_modmap : Error< 94 "module '%0' %select{uses|does not use}1 additional module map '%2'" 95 "%select{| not}1 used when the module was built">; 96 97def err_pch_macro_def_undef : Error< 98 "macro '%0' was %select{defined|undef'd}1 in the precompiled header but " 99 "%select{undef'd|defined}1 on the command line">; 100def err_pch_macro_def_conflict : Error< 101 "definition of macro '%0' differs between the precompiled header ('%1') " 102 "and the command line ('%2')">; 103def err_pch_undef : Error< 104 "%select{command line contains|precompiled header was built with}0 " 105 "'-undef' but %select{precompiled header was not built with it|" 106 "it is not present on the command line}0">; 107def err_pch_pp_detailed_record : Error< 108 "%select{command line contains|precompiled header was built with}0 " 109 "'-detailed-preprocessing-record' but %select{precompiled header was not " 110 "built with it|it is not present on the command line}0">; 111 112def err_module_odr_violation_missing_decl : Error< 113 "%q0 from module '%1' is not present in definition of %q2" 114 "%select{ in module '%4'| provided earlier}3">, NoSFINAE; 115def note_module_odr_violation_no_possible_decls : Note< 116 "definition has no member %0">; 117def note_module_odr_violation_possible_decl : Note< 118 "declaration of %0 does not match">; 119 120def err_module_odr_violation_different_instantiations : Error< 121 "instantiation of %q0 is different in different modules">; 122 123def warn_duplicate_module_file_extension : Warning< 124 "duplicate module file extension block name '%0'">, 125 InGroup<ModuleFileExtension>; 126 127def warn_module_system_bit_conflict : Warning< 128 "module file '%0' was validated as a system module and is now being imported " 129 "as a non-system module; any difference in diagnostic options will be ignored">, 130 InGroup<ModuleConflict>; 131 132def err_failed_to_find_module_file : Error< 133 "failed to find module file for module '%0'">; 134} // let CategoryName 135 136let CategoryName = "AST Serialization Issue" in { 137def warn_module_uses_date_time : Warning< 138 "%select{precompiled header|module}0 uses __DATE__ or __TIME__">, 139 InGroup<DiagGroup<"pch-date-time">>; 140def err_module_no_size_mtime_for_header : Error< 141 "cannot emit module %0: %select{size|mtime}1 must be explicitly specified " 142 "for missing header file \"%2\"">; 143def err_module_unable_to_hash_content : Error< 144 "failed to hash content for '%0' because memory buffer cannot be retrieved">; 145} // let CategoryName 146} // let Component 147 148