diff options
author | Steve Naroff <snaroff@apple.com> | 2009-04-24 20:03:17 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2009-04-24 20:03:17 +0000 |
commit | 3fa455a1aad9ec64de07e889f5a40cf2a7e06348 (patch) | |
tree | 019245664bc2410d34fe17ee2008f9d1be02255b /clang/lib/Lex/HeaderSearch.cpp | |
parent | 53c5b7e0bd2d2000339aa6856e75b98235e7edf9 (diff) | |
download | bcm5719-llvm-3fa455a1aad9ec64de07e889f5a40cf2a7e06348.tar.gz bcm5719-llvm-3fa455a1aad9ec64de07e889f5a40cf2a7e06348.zip |
Add PCH support for #import.
llvm-svn: 69987
Diffstat (limited to 'clang/lib/Lex/HeaderSearch.cpp')
-rw-r--r-- | clang/lib/Lex/HeaderSearch.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/clang/lib/Lex/HeaderSearch.cpp b/clang/lib/Lex/HeaderSearch.cpp index 2cc29ecbed8..ddea8e52a02 100644 --- a/clang/lib/Lex/HeaderSearch.cpp +++ b/clang/lib/Lex/HeaderSearch.cpp @@ -377,14 +377,20 @@ LookupSubframeworkHeader(const char *FilenameStart, //===----------------------------------------------------------------------===// -/// getFileInfo - Return the PerFileInfo structure for the specified +/// getFileInfo - Return the HeaderFileInfo structure for the specified /// FileEntry. -HeaderSearch::PerFileInfo &HeaderSearch::getFileInfo(const FileEntry *FE) { +HeaderFileInfo &HeaderSearch::getFileInfo(const FileEntry *FE) { if (FE->getUID() >= FileInfo.size()) FileInfo.resize(FE->getUID()+1); return FileInfo[FE->getUID()]; } +void HeaderSearch::setHeaderFileInfoForUID(HeaderFileInfo HFI, unsigned UID) { + if (UID >= FileInfo.size()) + FileInfo.resize(UID+1); + FileInfo[UID] = HFI; +} + /// ShouldEnterIncludeFile - Mark the specified file as a target of of a /// #include, #include_next, or #import directive. Return false if #including /// the file will have no effect or true if we should include it. @@ -392,7 +398,7 @@ bool HeaderSearch::ShouldEnterIncludeFile(const FileEntry *File, bool isImport){ ++NumIncluded; // Count # of attempted #includes. // Get information about this file. - PerFileInfo &FileInfo = getFileInfo(File); + HeaderFileInfo &FileInfo = getFileInfo(File); // If this is a #import directive, check that we have not already imported // this header. |