1//==--- DiagnosticSerializationKinds.td - serialization diagnostics -------===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10let Component = "Serialization" in {
11let CategoryName = "AST Deserialization Issue" in {
12
13def err_fe_unable_to_read_pch_file : Error<
14    "unable to read PCH file %0: '%1'">;
15def err_fe_not_a_pch_file : Error<
16    "input is not a PCH file: '%0'">;
17def err_fe_pch_malformed : Error<
18    "malformed or corrupted AST file: '%0'">, DefaultFatal;
19def err_fe_pch_malformed_block : Error<
20    "malformed block record in PCH file: '%0'">, DefaultFatal;
21def err_fe_pch_file_modified : Error<
22    "file '%0' has been modified since the precompiled header '%1' was built">,
23    DefaultFatal;
24def err_fe_pch_file_overridden : Error<
25    "file '%0' from the precompiled header has been overridden">;
26def note_pch_required_by : Note<"'%0' required by '%1'">;
27def note_pch_rebuild_required : Note<"please rebuild precompiled header '%0'">;
28def note_module_cache_path : Note<
29    "after modifying system headers, please delete the module cache at '%0'">;
30
31def err_pch_targetopt_mismatch : Error<
32    "PCH file was compiled for the %0 '%1' but the current translation "
33    "unit is being compiled for target '%2'">;
34def err_pch_targetopt_feature_mismatch : Error<
35    "%select{AST file|current translation unit}0 was compiled with the target "
36    "feature'%1' but the %select{current translation unit is|AST file was}0 "
37    "not">;
38def err_pch_langopt_mismatch : Error<"%0 was %select{disabled|enabled}1 in "
39    "PCH file but is currently %select{disabled|enabled}2">;
40def err_pch_langopt_value_mismatch : Error<
41  "%0 differs in PCH file vs. current file">;
42def err_pch_diagopt_mismatch : Error<"%0 is currently enabled, but was not in "
43  "the PCH file">;
44def err_pch_modulecache_mismatch : Error<"PCH was compiled with module cache "
45  "path '%0', but the path is currently '%1'">;
46  
47def err_pch_version_too_old : Error<
48    "PCH file uses an older PCH format that is no longer supported">;
49def err_pch_version_too_new : Error<
50    "PCH file uses a newer PCH format that cannot be read">;
51def err_pch_different_branch : Error<
52    "PCH file built from a different branch (%0) than the compiler (%1)">;
53def err_pch_with_compiler_errors : Error<
54    "PCH file contains compiler errors">;
55
56def err_module_file_conflict : Error<
57  "module '%0' is defined in both '%1' and '%2'">, DefaultFatal;
58def err_module_file_not_found : Error<
59  "%select{PCH|module|AST}0 file '%1' not found%select{|: %3}2">, DefaultFatal;
60def err_module_file_out_of_date : Error<
61  "%select{PCH|module|AST}0 file '%1' is out of date and "
62  "needs to be rebuilt%select{|: %3}2">, DefaultFatal;
63def err_module_file_invalid : Error<
64  "file '%1' is not a valid precompiled %select{PCH|module|AST}0 file">, DefaultFatal;
65def note_module_file_imported_by : Note<
66  "imported by %select{|module '%2' in }1'%0'">;
67def err_module_file_not_module : Error<
68  "AST file '%0' was not built as a module">, DefaultFatal;
69
70def err_imported_module_not_found : Error<
71    "module '%0' in AST file '%1' (imported by AST file '%2') "
72    "is not defined in any loaded module map file; "
73    "maybe you need to load '%3'?">, DefaultFatal;
74def err_imported_module_modmap_changed : Error<
75    "module '%0' imported by AST file '%1' found in a different module map file"
76    " (%2) than when the importing AST file was built (%3)">, DefaultFatal;
77def err_imported_module_relocated : Error<
78    "module '%0' was built in directory '%1' but now resides in "
79    "directory '%2'">, DefaultFatal;
80def err_module_different_modmap : Error<
81    "module '%0' %select{uses|does not use}1 additional module map '%2'"
82    "%select{| not}1 used when the module was built">;
83
84def err_pch_macro_def_undef : Error<
85    "macro '%0' was %select{defined|undef'd}1 in the precompiled header but "
86    "%select{undef'd|defined}1 on the command line">;
87def err_pch_macro_def_conflict : Error<
88    "definition of macro '%0' differs between the precompiled header ('%1') "
89    "and the command line ('%2')">;
90def err_pch_undef : Error<
91    "%select{command line contains|precompiled header was built with}0 "
92    "'-undef' but %select{precompiled header was not built with it|"
93    "it is not present on the command line}0">;
94def err_pch_pp_detailed_record : Error<
95    "%select{command line contains|precompiled header was built with}0 "
96    "'-detailed-preprocessing-record' but %select{precompiled header was not "
97    "built with it|it is not present on the command line}0">;
98
99def err_module_odr_violation_missing_decl : Error<
100  "%q0 from module '%1' is not present in definition of %q2"
101  "%select{ in module '%4'| provided earlier}3">, NoSFINAE;
102def note_module_odr_violation_no_possible_decls : Note<
103  "definition has no member %0">;
104def note_module_odr_violation_possible_decl : Note<
105  "declaration of %0 does not match">;
106def err_module_odr_violation_different_definitions : Error<
107  "%q0 has different definitions in different modules; "
108  "%select{definition in module '%2' is here|defined here}1">;
109def note_module_odr_violation_different_definitions : Note<
110  "definition in module '%0' is here">;
111def err_module_odr_violation_different_instantiations : Error<
112  "instantiation of %q0 is different in different modules">;
113
114def warn_module_uses_date_time : Warning<
115  "%select{precompiled header|module}0 uses __DATE__ or __TIME__">,
116  InGroup<DiagGroup<"pch-date-time">>;
117
118def warn_duplicate_module_file_extension : Warning<
119  "duplicate module file extension block name '%0'">,
120  InGroup<ModuleFileExtension>;
121
122} // let CategoryName
123} // let Component
124
125