]> granicus.if.org Git - clang/commit
Prevent outputting HeaderFileInfos for files not used as headers
authorBen Langmuir <blangmuir@apple.com>
Thu, 13 Mar 2014 16:46:36 +0000 (16:46 +0000)
committerBen Langmuir <blangmuir@apple.com>
Thu, 13 Mar 2014 16:46:36 +0000 (16:46 +0000)
commit201cbad62dca645abcee1fd01df3e29bf5fe0deb
tree2de83243a5e6ea8f92c5f4cd6340152c02f1b7e0
parent39c2bc7a3d1b7d9a1e56d631b0b493b5bdb7a6f2
Prevent outputting HeaderFileInfos for files not used as headers

When building an AST file, we don't want to output HeaderFileInfo
structures for files that are not actually used as headers in the
current context.  This can lead to assuming that unrelated files have
include counts of 0, defeating multiple-include prevention.

This is accomplished by adding an IsValid bit to the HFI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203813 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Lex/HeaderSearch.h
lib/Lex/HeaderSearch.cpp
lib/Serialization/ASTWriter.cpp