[cfe-commits] r45094 - in /cfe/trunk: Lex/HeaderSearch.cpp include/clang/Lex/HeaderMap.h
Chris Lattner
sabre at nondot.org
Mon Dec 17 00:17:39 PST 2007
Author: lattner
Date: Mon Dec 17 02:17:39 2007
New Revision: 45094
URL: http://llvm.org/viewvc/llvm-project?rev=45094&view=rev
Log:
finish stubbing out support for HeaderMap. Now we just need an implementation!
Modified:
cfe/trunk/Lex/HeaderSearch.cpp
cfe/trunk/include/clang/Lex/HeaderMap.h
Modified: cfe/trunk/Lex/HeaderSearch.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Lex/HeaderSearch.cpp?rev=45094&r1=45093&r2=45094&view=diff
==============================================================================
--- cfe/trunk/Lex/HeaderSearch.cpp (original)
+++ cfe/trunk/Lex/HeaderSearch.cpp Mon Dec 17 02:17:39 2007
@@ -100,7 +100,8 @@
if (isFramework())
return DoFrameworkLookup(FilenameStart, FilenameEnd, HS);
- assert(0 && "headermap unimp");
+ assert(isHeaderMap() && "Unknown directory lookup");
+ return getHeaderMap()->LookupFile(FilenameStart, FilenameEnd,HS.getFileMgr());
}
Modified: cfe/trunk/include/clang/Lex/HeaderMap.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/HeaderMap.h?rev=45094&r1=45093&r2=45094&view=diff
==============================================================================
--- cfe/trunk/include/clang/Lex/HeaderMap.h (original)
+++ cfe/trunk/include/clang/Lex/HeaderMap.h Mon Dec 17 02:17:39 2007
@@ -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 @@
// 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.
More information about the cfe-commits
mailing list