forked from OSchip/llvm-project
Store/retrieve -fshort-enums for PCH, fixes rdar://8854933.
llvm-svn: 123510
This commit is contained in:
parent
49462ea7e4
commit
a88942ad9c
|
@ -2630,6 +2630,7 @@ bool ASTReader::ParseLanguageOptions(
|
||||||
PARSE_LANGOPT(AccessControl);
|
PARSE_LANGOPT(AccessControl);
|
||||||
PARSE_LANGOPT(CharIsSigned);
|
PARSE_LANGOPT(CharIsSigned);
|
||||||
PARSE_LANGOPT(ShortWChar);
|
PARSE_LANGOPT(ShortWChar);
|
||||||
|
PARSE_LANGOPT(ShortEnums);
|
||||||
LangOpts.setGCMode((LangOptions::GCMode)Record[Idx++]);
|
LangOpts.setGCMode((LangOptions::GCMode)Record[Idx++]);
|
||||||
LangOpts.setVisibilityMode((Visibility)Record[Idx++]);
|
LangOpts.setVisibilityMode((Visibility)Record[Idx++]);
|
||||||
LangOpts.setStackProtectorMode((LangOptions::StackProtectorMode)
|
LangOpts.setStackProtectorMode((LangOptions::StackProtectorMode)
|
||||||
|
|
|
@ -941,6 +941,9 @@ void ASTWriter::WriteLanguageOptions(const LangOptions &LangOpts) {
|
||||||
Record.push_back(LangOpts.CharIsSigned); // Whether char is a signed or
|
Record.push_back(LangOpts.CharIsSigned); // Whether char is a signed or
|
||||||
// unsigned type
|
// unsigned type
|
||||||
Record.push_back(LangOpts.ShortWChar); // force wchar_t to be unsigned short
|
Record.push_back(LangOpts.ShortWChar); // force wchar_t to be unsigned short
|
||||||
|
Record.push_back(LangOpts.ShortEnums); // Should the enum type be equivalent
|
||||||
|
// to the smallest integer type with
|
||||||
|
// enough room.
|
||||||
Record.push_back(LangOpts.getGCMode());
|
Record.push_back(LangOpts.getGCMode());
|
||||||
Record.push_back(LangOpts.getVisibilityMode());
|
Record.push_back(LangOpts.getVisibilityMode());
|
||||||
Record.push_back(LangOpts.getStackProtectorMode());
|
Record.push_back(LangOpts.getStackProtectorMode());
|
||||||
|
|
Loading…
Reference in New Issue