diff options
author | Chris Lattner <sabre@nondot.org> | 2007-12-17 08:17:39 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-12-17 08:17:39 +0000 |
commit | b09e71fd52d0e7fdf3e88b1df72ea0cee5d9b37b (patch) | |
tree | e5f9e9d2a04f28b1ba2e7ad0ce33a75b2c5a7648 | |
parent | afded5bbb85607023c710c3d6a96c372feb84d7f (diff) |
finish stubbing out support for HeaderMap. Now we just need an implementation!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45094 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | Lex/HeaderSearch.cpp | 3 | ||||
-rw-r--r-- | include/clang/Lex/HeaderMap.h | 13 |
2 files changed, 15 insertions, 1 deletions
diff --git a/Lex/HeaderSearch.cpp b/Lex/HeaderSearch.cpp index 3489de5605..1d79effc84 100644 --- a/Lex/HeaderSearch.cpp +++ b/Lex/HeaderSearch.cpp @@ -100,7 +100,8 @@ const FileEntry *DirectoryLookup::LookupFile(const char *FilenameStart, if (isFramework()) return DoFrameworkLookup(FilenameStart, FilenameEnd, HS); - assert(0 && "headermap unimp"); + assert(isHeaderMap() && "Unknown directory lookup"); + return getHeaderMap()->LookupFile(FilenameStart, FilenameEnd,HS.getFileMgr()); } diff --git a/include/clang/Lex/HeaderMap.h b/include/clang/Lex/HeaderMap.h index 7c79fe0447..ffc665094e 100644 --- a/include/clang/Lex/HeaderMap.h +++ b/include/clang/Lex/HeaderMap.h @@ -14,7 +14,11 @@ #ifndef LLVM_CLANG_LEX_HEADERMAP_H #define LLVM_CLANG_LEX_HEADERMAP_H +#include <string> + namespace clang { + class FileEntry; + class FileManager; /// This class represents an Apple concept known as a 'header map'. To the /// #include file resolution process, it basically acts like a directory of @@ -30,6 +34,15 @@ public: // FIXME: woot! return 0; } + + /// LookupFile - Check to see if the specified relative filename is located in + /// this HeaderMap. If so, open it and return its FileEntry. + const FileEntry *LookupFile(const char *FilenameStart,const char *FilenameEnd, + FileManager &FM) const { + // FIXME: this needs work. + return 0; + } + }; } // end namespace clang. |