[cfe-commits] r138597 - in /cfe/trunk: include/clang-c/Index.h include/clang/Driver/CC1Options.td include/clang/Frontend/ASTUnit.h include/clang/Frontend/FrontendOptions.h lib/Frontend/ASTUnit.cpp lib/Frontend/CompilerInvocation.cpp test/PCH/chain-decls.c test/PCH/chain-ext_vector.c test/PCH/chain-external-defs.c test/PCH/chain-macro-override.c test/PCH/chain-macro.c test/PCH/chain-predecl.m test/PCH/chain-remap-types.m test/PCH/chain-selectors.m test/PCH/chain-trivial.c tools/libclang/CIndex.cpp
Douglas Gregor
dgregor at apple.com
Thu Aug 25 15:54:01 PDT 2011
Author: dgregor
Date: Thu Aug 25 17:54:01 2011
New Revision: 138597
URL: http://llvm.org/viewvc/llvm-project?rev=138597&view=rev
Log:
Eliminate the -chained-pch flag and all of the frontend and libclang options associated with it. Chained PCH is the only way to build a PCH file that includes another PCH file
Modified:
cfe/trunk/include/clang-c/Index.h
cfe/trunk/include/clang/Driver/CC1Options.td
cfe/trunk/include/clang/Frontend/ASTUnit.h
cfe/trunk/include/clang/Frontend/FrontendOptions.h
cfe/trunk/lib/Frontend/ASTUnit.cpp
cfe/trunk/lib/Frontend/CompilerInvocation.cpp
cfe/trunk/test/PCH/chain-decls.c
cfe/trunk/test/PCH/chain-ext_vector.c
cfe/trunk/test/PCH/chain-external-defs.c
cfe/trunk/test/PCH/chain-macro-override.c
cfe/trunk/test/PCH/chain-macro.c
cfe/trunk/test/PCH/chain-predecl.m
cfe/trunk/test/PCH/chain-remap-types.m
cfe/trunk/test/PCH/chain-selectors.m
cfe/trunk/test/PCH/chain-trivial.c
cfe/trunk/tools/libclang/CIndex.cpp
Modified: cfe/trunk/include/clang-c/Index.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang-c/Index.h?rev=138597&r1=138596&r2=138597&view=diff
==============================================================================
--- cfe/trunk/include/clang-c/Index.h (original)
+++ cfe/trunk/include/clang-c/Index.h Thu Aug 25 17:54:01 2011
@@ -824,18 +824,18 @@
*/
CXTranslationUnit_CacheCompletionResults = 0x08,
/**
- * \brief Enable precompiled preambles in C++.
+ * \brief DEPRECATED: Enable precompiled preambles in C++.
*
* Note: this is a *temporary* option that is available only while
- * we are testing C++ precompiled preamble support.
+ * we are testing C++ precompiled preamble support. It is deprecated.
*/
CXTranslationUnit_CXXPrecompiledPreamble = 0x10,
/**
- * \brief Enabled chained precompiled preambles in C++.
+ * \brief DEPRECATED: Enabled chained precompiled preambles in C++.
*
* Note: this is a *temporary* option that is available only while
- * we are testing C++ precompiled preamble support.
+ * we are testing C++ precompiled preamble support. It is deprecated.
*/
CXTranslationUnit_CXXChainedPCH = 0x20,
Modified: cfe/trunk/include/clang/Driver/CC1Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CC1Options.td?rev=138597&r1=138596&r2=138597&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/CC1Options.td (original)
+++ cfe/trunk/include/clang/Driver/CC1Options.td Thu Aug 25 17:54:01 2011
@@ -412,8 +412,6 @@
def relocatable_pch : Flag<"-relocatable-pch">,
HelpText<"Whether to build a relocatable precompiled header">;
-def chained_pch : Flag<"-chained-pch">,
- HelpText<"Whether to chain the new precompiled header to the old one.">;
def print_stats : Flag<"-print-stats">,
HelpText<"Print performance metrics and statistics">;
def ftime_report : Flag<"-ftime-report">,
Modified: cfe/trunk/include/clang/Frontend/ASTUnit.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/ASTUnit.h?rev=138597&r1=138596&r2=138597&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/ASTUnit.h (original)
+++ cfe/trunk/include/clang/Frontend/ASTUnit.h Thu Aug 25 17:54:01 2011
@@ -651,8 +651,6 @@
bool PrecompilePreamble = false,
TranslationUnitKind TUKind = TU_Complete,
bool CacheCodeCompletionResults = false,
- bool CXXPrecompilePreamble = false,
- bool CXXChainedPCH = false,
bool NestedMacroExpansions = true);
/// \brief Reparse the source files using the same command-line options that
Modified: cfe/trunk/include/clang/Frontend/FrontendOptions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/FrontendOptions.h?rev=138597&r1=138596&r2=138597&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/FrontendOptions.h (original)
+++ cfe/trunk/include/clang/Frontend/FrontendOptions.h Thu Aug 25 17:54:01 2011
@@ -59,9 +59,6 @@
unsigned RelocatablePCH : 1; ///< When generating PCH files,
/// instruct the AST writer to create
/// relocatable PCH files.
- unsigned ChainedPCH : 1; ///< When generating PCH files,
- /// instruct the AST writer to create
- /// chained PCH files.
unsigned ShowHelp : 1; ///< Show the -help text.
unsigned ShowMacrosInCodeCompletion : 1; ///< Show macros in code completion
/// results.
@@ -135,7 +132,6 @@
ProgramAction = frontend::ParseSyntaxOnly;
ActionName = "";
RelocatablePCH = 0;
- ChainedPCH = 0;
ShowHelp = 0;
ShowMacrosInCodeCompletion = 0;
ShowCodePatternsInCodeCompletion = 0;
Modified: cfe/trunk/lib/Frontend/ASTUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/ASTUnit.cpp?rev=138597&r1=138596&r2=138597&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/ASTUnit.cpp (original)
+++ cfe/trunk/lib/Frontend/ASTUnit.cpp Thu Aug 25 17:54:01 2011
@@ -1354,7 +1354,6 @@
// Tell the compiler invocation to generate a temporary precompiled header.
FrontendOpts.ProgramAction = frontend::GeneratePCH;
- FrontendOpts.ChainedPCH = true;
// FIXME: Generate the precompiled header into memory?
FrontendOpts.OutputFile = PreamblePCHPath;
PreprocessorOpts.PrecompiledPreambleBytes.first = 0;
@@ -1761,8 +1760,6 @@
bool PrecompilePreamble,
TranslationUnitKind TUKind,
bool CacheCodeCompletionResults,
- bool CXXPrecompilePreamble,
- bool CXXChainedPCH,
bool NestedMacroExpansions) {
if (!Diags.getPtr()) {
// No diagnostics engine was provided, so create our own diagnostics object
@@ -1805,16 +1802,6 @@
// Override the resources path.
CI->getHeaderSearchOpts().ResourceDir = ResourceFilesPath;
- // Check whether we should precompile the preamble and/or use chained PCH.
- // FIXME: This is a temporary hack while we debug C++ chained PCH.
- if (CI->getLangOpts().CPlusPlus) {
- PrecompilePreamble = PrecompilePreamble && CXXPrecompilePreamble;
-
- if (PrecompilePreamble && !CXXChainedPCH &&
- !CI->getPreprocessorOpts().ImplicitPCHInclude.empty())
- PrecompilePreamble = false;
- }
-
// Create the AST unit.
llvm::OwningPtr<ASTUnit> AST;
AST.reset(new ASTUnit(false));
Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=138597&r1=138596&r2=138597&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Thu Aug 25 17:54:01 2011
@@ -405,8 +405,6 @@
Res.push_back("-disable-free");
if (Opts.RelocatablePCH)
Res.push_back("-relocatable-pch");
- if (Opts.ChainedPCH)
- Res.push_back("-chained-pch");
if (Opts.ShowHelp)
Res.push_back("-help");
if (Opts.ShowMacrosInCodeCompletion)
@@ -1271,7 +1269,6 @@
Opts.OutputFile = Args.getLastArgValue(OPT_o);
Opts.Plugins = Args.getAllArgValues(OPT_load);
Opts.RelocatablePCH = Args.hasArg(OPT_relocatable_pch);
- Opts.ChainedPCH = Args.hasArg(OPT_chained_pch);
Opts.ShowHelp = Args.hasArg(OPT_help);
Opts.ShowMacrosInCodeCompletion = Args.hasArg(OPT_code_completion_macros);
Opts.ShowCodePatternsInCodeCompletion
Modified: cfe/trunk/test/PCH/chain-decls.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/chain-decls.c?rev=138597&r1=138596&r2=138597&view=diff
==============================================================================
--- cfe/trunk/test/PCH/chain-decls.c (original)
+++ cfe/trunk/test/PCH/chain-decls.c Thu Aug 25 17:54:01 2011
@@ -3,7 +3,7 @@
// Test with pch.
// RUN: %clang_cc1 -emit-pch -o %t1 %S/Inputs/chain-decls1.h
-// RUN: %clang_cc1 -emit-pch -o %t2 %S/Inputs/chain-decls2.h -include-pch %t1 -chained-pch
+// RUN: %clang_cc1 -emit-pch -o %t2 %S/Inputs/chain-decls2.h -include-pch %t1
// RUN: %clang_cc1 -include-pch %t2 -fsyntax-only -verify %s
// RUN: %clang_cc1 -ast-print -include-pch %t2 %s | FileCheck %s
Modified: cfe/trunk/test/PCH/chain-ext_vector.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/chain-ext_vector.c?rev=138597&r1=138596&r2=138597&view=diff
==============================================================================
--- cfe/trunk/test/PCH/chain-ext_vector.c (original)
+++ cfe/trunk/test/PCH/chain-ext_vector.c Thu Aug 25 17:54:01 2011
@@ -3,7 +3,7 @@
// Test with pch.
// RUN: %clang_cc1 -emit-pch -o %t1 %S/Inputs/chain-ext_vector1.h
-// RUN: %clang_cc1 -emit-pch -o %t2 %S/Inputs/chain-ext_vector2.h -include-pch %t1 -chained-pch
+// RUN: %clang_cc1 -emit-pch -o %t2 %S/Inputs/chain-ext_vector2.h -include-pch %t1
// RUN: %clang_cc1 -include-pch %t2 -fsyntax-only -verify %s
int test(float4 f4) {
Modified: cfe/trunk/test/PCH/chain-external-defs.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/chain-external-defs.c?rev=138597&r1=138596&r2=138597&view=diff
==============================================================================
--- cfe/trunk/test/PCH/chain-external-defs.c (original)
+++ cfe/trunk/test/PCH/chain-external-defs.c Thu Aug 25 17:54:01 2011
@@ -1,6 +1,6 @@
// Test with pch.
// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -emit-pch -o %t1.pch %S/Inputs/chain-external-defs1.h
-// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -emit-pch -o %t2.pch %S/Inputs/chain-external-defs2.h -include-pch %t1.pch -chained-pch
+// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -emit-pch -o %t2.pch %S/Inputs/chain-external-defs2.h -include-pch %t1.pch
// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -include-pch %t2.pch -emit-llvm -o %t %s
// RUN: echo FINI >> %t
// RUN: FileCheck -input-file=%t -check-prefix=Z %s
Modified: cfe/trunk/test/PCH/chain-macro-override.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/chain-macro-override.c?rev=138597&r1=138596&r2=138597&view=diff
==============================================================================
--- cfe/trunk/test/PCH/chain-macro-override.c (original)
+++ cfe/trunk/test/PCH/chain-macro-override.c Thu Aug 25 17:54:01 2011
@@ -3,7 +3,7 @@
// Test with pch.
// RUN: %clang_cc1 -emit-pch -o %t1 %S/Inputs/chain-macro-override1.h -detailed-preprocessing-record
-// RUN: %clang_cc1 -emit-pch -o %t2 %S/Inputs/chain-macro-override2.h -include-pch %t1 -chained-pch -detailed-preprocessing-record
+// RUN: %clang_cc1 -emit-pch -o %t2 %S/Inputs/chain-macro-override2.h -include-pch %t1 -detailed-preprocessing-record
// RUN: %clang_cc1 -include-pch %t2 -fsyntax-only -verify %s
int foo() {
Modified: cfe/trunk/test/PCH/chain-macro.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/chain-macro.c?rev=138597&r1=138596&r2=138597&view=diff
==============================================================================
--- cfe/trunk/test/PCH/chain-macro.c (original)
+++ cfe/trunk/test/PCH/chain-macro.c Thu Aug 25 17:54:01 2011
@@ -1,5 +1,5 @@
// RUN: %clang_cc1 -emit-pch -o %t1 -detailed-preprocessing-record %S/Inputs/chain-macro1.h
-// RUN: %clang_cc1 -emit-pch -o %t2 -detailed-preprocessing-record %S/Inputs/chain-macro2.h -include-pch %t1 -chained-pch
+// RUN: %clang_cc1 -emit-pch -o %t2 -detailed-preprocessing-record %S/Inputs/chain-macro2.h -include-pch %t1
// RUN: %clang_cc1 -fsyntax-only -verify -include-pch %t2 %s
// RUN: %clang_cc1 -ast-print -include-pch %t2 %s | FileCheck %s
Modified: cfe/trunk/test/PCH/chain-predecl.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/chain-predecl.m?rev=138597&r1=138596&r2=138597&view=diff
==============================================================================
--- cfe/trunk/test/PCH/chain-predecl.m (original)
+++ cfe/trunk/test/PCH/chain-predecl.m Thu Aug 25 17:54:01 2011
@@ -1,5 +1,5 @@
// RUN: %clang_cc1 -emit-pch -o %t1 %S/chain-predecl.h -x objective-c
-// RUN: %clang_cc1 -emit-pch -o %t2 %s -x objective-c -include-pch %t1 -chained-pch
+// RUN: %clang_cc1 -emit-pch -o %t2 %s -x objective-c -include-pch %t1
// Test predeclarations across chained PCH.
@interface Foo
Modified: cfe/trunk/test/PCH/chain-remap-types.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/chain-remap-types.m?rev=138597&r1=138596&r2=138597&view=diff
==============================================================================
--- cfe/trunk/test/PCH/chain-remap-types.m (original)
+++ cfe/trunk/test/PCH/chain-remap-types.m Thu Aug 25 17:54:01 2011
@@ -1,5 +1,5 @@
// RUN: %clang_cc1 -emit-pch -x objective-c-header -o %t1 %S/Inputs/chain-remap-types1.h
-// RUN: %clang_cc1 -emit-pch -x objective-c-header -o %t2 %S/Inputs/chain-remap-types2.h -include-pch %t1 -chained-pch
+// RUN: %clang_cc1 -emit-pch -x objective-c-header -o %t2 %S/Inputs/chain-remap-types2.h -include-pch %t1
// RUN: %clang_cc1 -include-pch %t2 -fsyntax-only -verify %s
// RUN: %clang_cc1 -ast-print -include-pch %t2 %s | FileCheck %s
Modified: cfe/trunk/test/PCH/chain-selectors.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/chain-selectors.m?rev=138597&r1=138596&r2=138597&view=diff
==============================================================================
--- cfe/trunk/test/PCH/chain-selectors.m (original)
+++ cfe/trunk/test/PCH/chain-selectors.m Thu Aug 25 17:54:01 2011
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s -Wselector -include %S/Inputs/chain-selectors1.h -include %S/Inputs/chain-selectors2.h
// RUN: %clang_cc1 -x objective-c -emit-pch -o %t1 %S/Inputs/chain-selectors1.h
-// RUN: %clang_cc1 -x objective-c -emit-pch -o %t2 %S/Inputs/chain-selectors2.h -include-pch %t1 -chained-pch
+// RUN: %clang_cc1 -x objective-c -emit-pch -o %t2 %S/Inputs/chain-selectors2.h -include-pch %t1
// RUN: %clang_cc1 -fsyntax-only -verify %s -Wselector -include-pch %t2
@implementation X
Modified: cfe/trunk/test/PCH/chain-trivial.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/chain-trivial.c?rev=138597&r1=138596&r2=138597&view=diff
==============================================================================
--- cfe/trunk/test/PCH/chain-trivial.c (original)
+++ cfe/trunk/test/PCH/chain-trivial.c Thu Aug 25 17:54:01 2011
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-pch -o %t1 %S/Inputs/chain-trivial1.h
-// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-pch -o %t2 -include-pch %t1 -chained-pch %S/Inputs/chain-trivial2.h
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-pch -o %t2 -include-pch %t1 %S/Inputs/chain-trivial2.h
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -ast-print -include-pch %t2 %s | FileCheck %s
// CHECK: struct __va_list_tag {
Modified: cfe/trunk/tools/libclang/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndex.cpp?rev=138597&r1=138596&r2=138597&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndex.cpp (original)
+++ cfe/trunk/tools/libclang/CIndex.cpp Thu Aug 25 17:54:01 2011
@@ -2414,9 +2414,7 @@
unsigned clang_defaultEditingTranslationUnitOptions() {
return CXTranslationUnit_PrecompiledPreamble |
- CXTranslationUnit_CacheCompletionResults |
- CXTranslationUnit_CXXPrecompiledPreamble |
- CXTranslationUnit_CXXChainedPCH;
+ CXTranslationUnit_CacheCompletionResults;
}
CXTranslationUnit
@@ -2467,10 +2465,6 @@
= (options & CXTranslationUnit_Incomplete)? TU_Prefix : TU_Complete;
bool CacheCodeCompetionResults
= options & CXTranslationUnit_CacheCompletionResults;
- bool CXXPrecompilePreamble
- = options & CXTranslationUnit_CXXPrecompiledPreamble;
- bool CXXChainedPCH
- = options & CXTranslationUnit_CXXChainedPCH;
// Configure the diagnostics.
DiagnosticOptions DiagOpts;
@@ -2556,8 +2550,6 @@
PrecompilePreamble,
TUKind,
CacheCodeCompetionResults,
- CXXPrecompilePreamble,
- CXXChainedPCH,
NestedMacroExpansions));
if (NumErrors != Diags->getClient()->getNumErrors()) {
More information about the cfe-commits
mailing list