HeaderMap.h revision b09e71fd52d0e7fdf3e88b1df72ea0cee5d9b37b
1//===--- HeaderMap.h - A file that acts like dir of symlinks ----*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file was developed by Chris Lattner and is distributed under 6// the University of Illinois Open Source License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9// 10// This file defines the HeaderMap interface. 11// 12//===----------------------------------------------------------------------===// 13 14#ifndef LLVM_CLANG_LEX_HEADERMAP_H 15#define LLVM_CLANG_LEX_HEADERMAP_H 16 17#include <string> 18 19namespace clang { 20 class FileEntry; 21 class FileManager; 22 23/// This class represents an Apple concept known as a 'header map'. To the 24/// #include file resolution process, it basically acts like a directory of 25/// symlinks to files. Its advantages are that it is dense and more efficient 26/// to create and process than a directory of symlinks. 27class HeaderMap { 28public: 29 /// HeaderMap::Create - This attempts to load the specified file as a header 30 /// map. If it doesn't look like a HeaderMap, it gives up and returns null. 31 /// If it looks like a HeaderMap but is obviously corrupted, it puts a reason 32 /// into the string error argument and returns null. 33 static const HeaderMap *Create(const FileEntry *FE, std::string &ErrorInfo) { 34 // FIXME: woot! 35 return 0; 36 } 37 38 /// LookupFile - Check to see if the specified relative filename is located in 39 /// this HeaderMap. If so, open it and return its FileEntry. 40 const FileEntry *LookupFile(const char *FilenameStart,const char *FilenameEnd, 41 FileManager &FM) const { 42 // FIXME: this needs work. 43 return 0; 44 } 45 46}; 47 48} // end namespace clang. 49 50#endif