[cfe-commits] r163958 - /cfe/trunk/lib/Frontend/ASTUnit.cpp
Argyrios Kyrtzidis
akyrtzi at gmail.com
Fri Sep 14 18:10:20 PDT 2012
Author: akirtzidis
Date: Fri Sep 14 20:10:20 2012
New Revision: 163958
URL: http://llvm.org/viewvc/llvm-project?rev=163958&view=rev
Log:
Allow disabling PCH validation when loading an AST file by checking
an environment variable for debugging purposes.
Modified:
cfe/trunk/lib/Frontend/ASTUnit.cpp
Modified: cfe/trunk/lib/Frontend/ASTUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/ASTUnit.cpp?rev=163958&r1=163957&r2=163958&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/ASTUnit.cpp (original)
+++ cfe/trunk/lib/Frontend/ASTUnit.cpp Fri Sep 14 20:10:20 2012
@@ -772,9 +772,12 @@
/*DelayInitialization=*/true);
ASTContext &Context = *AST->Ctx;
+ bool disableValid = false;
+ if (::getenv("LIBCLANG_DISABLE_PCH_VALIDATION"))
+ disableValid = true;
Reader.reset(new ASTReader(PP, Context,
/*isysroot=*/"",
- /*DisableValidation=*/false,
+ /*DisableValidation=*/disableValid,
/*DisableStatCache=*/false,
AllowPCHWithCompilerErrors));
More information about the cfe-commits
mailing list