diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-09-13 17:21:33 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-09-13 17:21:33 +0000 |
commit | 79a91418bd1a5e1cb50b34ec8a5d45a4eea4e898 (patch) | |
tree | e0871a264eeffe0faaf2e7bf42dc4eb0fd83bce3 /clang/lib/Serialization/ASTReader.cpp | |
parent | 0494c5c35d801083f63b033d8367909288b50a76 (diff) | |
download | bcm5719-llvm-79a91418bd1a5e1cb50b34ec8a5d45a4eea4e898.tar.gz bcm5719-llvm-79a91418bd1a5e1cb50b34ec8a5d45a4eea4e898.zip |
Switch LangOptions over to a .def file that describes header of the
language options. Use that .def file to declare the LangOptions class
and initialize all of its members, eliminating a source of annoying
initialization bugs.
AST serialization changes are next up.
llvm-svn: 139605
Diffstat (limited to 'clang/lib/Serialization/ASTReader.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTReader.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp index 09aee487234..dc359c1a001 100644 --- a/clang/lib/Serialization/ASTReader.cpp +++ b/clang/lib/Serialization/ASTReader.cpp @@ -138,13 +138,13 @@ PCHValidator::ReadLanguageOptions(const LangOptions &LangOpts) { PARSE_LANGOPT_IMPORTANT(CharIsSigned, diag::warn_pch_char_signed); PARSE_LANGOPT_IMPORTANT(ShortWChar, diag::warn_pch_short_wchar); PARSE_LANGOPT_IMPORTANT(ShortEnums, diag::warn_pch_short_enums); - if ((PPLangOpts.getGCMode() != 0) != (LangOpts.getGCMode() != 0)) { + if ((PPLangOpts.getGC() != 0) != (LangOpts.getGC() != 0)) { Reader.Diag(diag::warn_pch_gc_mode) - << LangOpts.getGCMode() << PPLangOpts.getGCMode(); + << LangOpts.getGC() << PPLangOpts.getGC(); return true; } PARSE_LANGOPT_BENIGN(getVisibilityMode()); - PARSE_LANGOPT_IMPORTANT(getStackProtectorMode(), + PARSE_LANGOPT_IMPORTANT(getStackProtector(), diag::warn_pch_stack_protector); PARSE_LANGOPT_BENIGN(InstantiationDepth); PARSE_LANGOPT_IMPORTANT(OpenCL, diag::warn_pch_opencl); @@ -3049,10 +3049,10 @@ bool ASTReader::ParseLanguageOptions( PARSE_LANGOPT(CharIsSigned); PARSE_LANGOPT(ShortWChar); PARSE_LANGOPT(ShortEnums); - LangOpts.setGCMode((LangOptions::GCMode)Record[Idx++]); + LangOpts.setGC((LangOptions::GCMode)Record[Idx++]); LangOpts.setVisibilityMode((Visibility)Record[Idx++]); - LangOpts.setStackProtectorMode((LangOptions::StackProtectorMode) - Record[Idx++]); + LangOpts.setStackProtector((LangOptions::StackProtectorMode) + Record[Idx++]); PARSE_LANGOPT(InstantiationDepth); PARSE_LANGOPT(OpenCL); PARSE_LANGOPT(CUDA); |