HeaderMap.h revision 1bfd4a6313ea8ebf710c46c10111732cc65d51f6
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 { 28 HeaderMap(const HeaderMap&); // DO NOT IMPLEMENT 29 void operator=(const HeaderMap&); // DO NOT IMPLEMENT 30public: 31 /// HeaderMap::Create - This attempts to load the specified file as a header 32 /// map. If it doesn't look like a HeaderMap, it gives up and returns null. 33 static const HeaderMap *Create(const FileEntry *FE); 34 35 /// LookupFile - Check to see if the specified relative filename is located in 36 /// this HeaderMap. If so, open it and return its FileEntry. 37 const FileEntry *LookupFile(const char *FilenameStart,const char *FilenameEnd, 38 FileManager &FM) const; 39 40 /// getFileName - Return the filename of the headermap. 41 const char *getFileName() const { 42 return ""; 43 } 44 45}; 46 47} // end namespace clang. 48 49#endif