]> granicus.if.org Git - clang/commit
Correctly implement -include search logic.
authorManuel Klimek <klimek@google.com>
Tue, 12 Aug 2014 08:25:57 +0000 (08:25 +0000)
committerManuel Klimek <klimek@google.com>
Tue, 12 Aug 2014 08:25:57 +0000 (08:25 +0000)
commit0e5c52d478abeb99b170acf55ea8cca37a775d92
tree3ec7f845f29eb40cabf3e9ed5d7de14dcd58bad5
parent4aeb30d14a493264600c4f75424fa74d1b1ddad2
Correctly implement -include search logic.

According to the gcc docs, -include uses the current working directory
for the lookup instead of the main source file.

This patch gets rid of NormalizeIncludePath (which relied on an
implementation detail of FileManager / FileEntry for the include path
logic to work), and instead hands the correct lookup information down to
LookupFile.

This will allow us to change the FileEntry's behavior regarding its Name
caching.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215433 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Lex/HeaderSearch.h
lib/Frontend/InitPreprocessor.cpp
lib/Frontend/Rewrite/InclusionRewriter.cpp
lib/Lex/HeaderSearch.cpp
lib/Lex/PPDirectives.cpp
lib/Serialization/ASTReader.cpp
test/Frontend/print-header-includes.c