]> granicus.if.org Git - clang/commit
[PCH] Fix timestamp check on windows hosts.
authorPierre Gousseau <pierregousseau14@gmail.com>
Wed, 13 Jul 2016 11:58:28 +0000 (11:58 +0000)
committerPierre Gousseau <pierregousseau14@gmail.com>
Wed, 13 Jul 2016 11:58:28 +0000 (11:58 +0000)
commit36278344077d6e44af7f1793a07fbbc650573cac
treee526ed40bafd42e93ec71d475ce4140e4ad0a01a
parent12fe3c4cf869ea54e63634124732d87e4ad030d6
[PCH] Fix timestamp check on windows hosts.

On Linux, if the timestamp of a header file, included in the pch, is modified, then including the pch without regenerating it causes a fatal error, which is reasonable.
On Windows the check is ifdefed out, allowing the compilation to continue in a broken state.
The root of the broken state is that, if timestamps dont match, the preprocessor will reparse a header without discarding the pch data.
This leads to "#pragma once" header to be included twice.
The reason behind the ifdefing of the check lacks documentation, and was done 6 years ago.
This change tentatively removes the ifdefing.

First part of patch proposed at:

Differential Revision: http://reviews.llvm.org/D20867

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275261 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Serialization/ASTReader.cpp