[PATCH] D24054: Do not validate pch when -fno-validate-pch is set
Yaxun Liu via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 30 13:45:39 PDT 2016
yaxunl created this revision.
yaxunl added reviewers: rsmith, Anastasia.
yaxunl added a subscriber: cfe-commits.
There is a bug causing pch to be validated even though -fno-validate-pch is set. This patch fixes it.
https://reviews.llvm.org/D24054
Files:
lib/Serialization/ASTReader.cpp
Index: lib/Serialization/ASTReader.cpp
===================================================================
--- lib/Serialization/ASTReader.cpp
+++ lib/Serialization/ASTReader.cpp
@@ -8708,7 +8708,8 @@
bool AllowConfigurationMismatch, bool ValidateSystemInputs,
bool UseGlobalIndex,
std::unique_ptr<llvm::Timer> ReadTimer)
- : Listener(new PCHValidator(PP, *this)), DeserializationListener(nullptr),
+ : Listener(DisableValidation ? nullptr : new PCHValidator(PP, *this)),
+ DeserializationListener(nullptr),
OwnsDeserializationListener(false), SourceMgr(PP.getSourceManager()),
FileMgr(PP.getFileManager()), PCHContainerRdr(PCHContainerRdr),
Diags(PP.getDiagnostics()), SemaObj(nullptr), PP(PP), Context(Context),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24054.69749.patch
Type: text/x-patch
Size: 755 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160830/404b4905/attachment.bin>
More information about the cfe-commits
mailing list