forked from OSchip/llvm-project
Check for -fno-constant-cfstrings consistency
in pch. llvm-svn: 102130
This commit is contained in:
parent
6adc5620ab
commit
62c560246e
|
@ -123,6 +123,9 @@ def warn_pch_nonfragile_abi2 : Error<
|
|||
"PCH file was compiled with the %select{32-bit|enhanced non-fragile}0 "
|
||||
"Objective-C ABI but the %select{32-bit|enhanced non-fragile}1 "
|
||||
"Objective-C ABI is selected">;
|
||||
def warn_pch_no_constant_cfstrings : Error<
|
||||
"Objctive-C NSstring generation support was %select{disabled|enabled}0 "
|
||||
"in PCH file but currently %select{disabled|enabled}1">;
|
||||
def warn_pch_extensions : Error<
|
||||
"extensions were %select{enabled|disabled}0 in PCH file but are "
|
||||
"currently %select{enabled|disabled}1">;
|
||||
|
|
|
@ -75,6 +75,8 @@ PCHValidator::ReadLanguageOptions(const LangOptions &LangOpts) {
|
|||
PARSE_LANGOPT_IMPORTANT(ObjC2, diag::warn_pch_objective_c2);
|
||||
PARSE_LANGOPT_IMPORTANT(ObjCNonFragileABI, diag::warn_pch_nonfragile_abi);
|
||||
PARSE_LANGOPT_IMPORTANT(ObjCNonFragileABI2, diag::warn_pch_nonfragile_abi2);
|
||||
PARSE_LANGOPT_IMPORTANT(NoConstantCFStrings,
|
||||
diag::warn_pch_no_constant_cfstrings);
|
||||
PARSE_LANGOPT_BENIGN(PascalStrings);
|
||||
PARSE_LANGOPT_BENIGN(WritableStrings);
|
||||
PARSE_LANGOPT_IMPORTANT(LaxVectorConversions,
|
||||
|
@ -1899,6 +1901,7 @@ bool PCHReader::ParseLanguageOptions(
|
|||
PARSE_LANGOPT(ObjC2);
|
||||
PARSE_LANGOPT(ObjCNonFragileABI);
|
||||
PARSE_LANGOPT(ObjCNonFragileABI2);
|
||||
PARSE_LANGOPT(NoConstantCFStrings);
|
||||
PARSE_LANGOPT(PascalStrings);
|
||||
PARSE_LANGOPT(WritableStrings);
|
||||
PARSE_LANGOPT(LaxVectorConversions);
|
||||
|
|
|
@ -761,6 +761,7 @@ void PCHWriter::WriteLanguageOptions(const LangOptions &LangOpts) {
|
|||
// modern abi enabled.
|
||||
Record.push_back(LangOpts.ObjCNonFragileABI2); // Objective-C enhanced
|
||||
// modern abi enabled.
|
||||
Record.push_back(LangOpts.NoConstantCFStrings); // non cfstring generation enabled..
|
||||
|
||||
Record.push_back(LangOpts.PascalStrings); // Allow Pascal strings
|
||||
Record.push_back(LangOpts.WritableStrings); // Allow writable strings
|
||||
|
|
Loading…
Reference in New Issue