From fae3b2f4743dad616623c4df2fdb0f5128bd36d9 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Tue, 27 Jul 2010 00:27:13 +0000 Subject: Implement -fno-validate-pch at the -cc1 level, which suppresses most of the usual consistency checks used to determine when a precompiled header is incompatible with the translation unit it's being loaded into. Enable this option when loading a precompiled preamble, because the preamble loader will be performing all of this checking itself. Enable the preamble-based test now that it's working. This option is also useful for debugging Clang's PCH (). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109475 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/CompilerInvocation.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/Frontend/CompilerInvocation.cpp') diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index 68703c22fb..0ae4739b41 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -1353,7 +1353,8 @@ static void ParsePreprocessorArgs(PreprocessorOptions &Opts, ArgList &Args, Opts.TokenCache = Opts.ImplicitPTHInclude; Opts.UsePredefines = !Args.hasArg(OPT_undef); Opts.DetailedRecord = Args.hasArg(OPT_detailed_preprocessing_record); - + Opts.DisablePCHValidation = Args.hasArg(OPT_fno_validate_pch); + if (const Arg *A = Args.getLastArg(OPT_preamble_bytes_EQ)) { llvm::StringRef Value(A->getValue(Args)); size_t Comma = Value.find(','); -- cgit v1.2.3