]> granicus.if.org Git - clang/commitdiff
add headermap.cpp
authorChris Lattner <sabre@nondot.org>
Mon, 17 Dec 2007 08:22:46 +0000 (08:22 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 17 Dec 2007 08:22:46 +0000 (08:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45095 91177308-0d34-0410-b5e6-96231b3b80d8

Lex/HeaderMap.cpp [new file with mode: 0644]
clang.xcodeproj/project.pbxproj
include/clang/Lex/HeaderMap.h

diff --git a/Lex/HeaderMap.cpp b/Lex/HeaderMap.cpp
new file mode 100644 (file)
index 0000000..5b9c4b0
--- /dev/null
@@ -0,0 +1,29 @@
+//===--- HeaderMap.cpp - A file that acts like dir of symlinks ------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file was developed by Chris Lattner and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file implements the HeaderMap interface.
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang/Lex/HeaderMap.h"
+using namespace clang;
+
+const HeaderMap *HeaderMap::Create(const FileEntry *FE, std::string &ErrorInfo){
+  // 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 *HeaderMap::LookupFile(const char *FilenameStart,
+                                       const char *FilenameEnd,
+                                       FileManager &FM) const {
+  // FIXME: this needs work.
+  return 0;
+}
index 649d1fd09e4e0005c85ec4800c21ca036920d994..cf12634213fe58bf9ef4cd7c4d9f5cf25cf8fdc3 100644 (file)
@@ -83,6 +83,7 @@
                DE6951C70C4D1F5D00A5826B /* RecordLayout.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE6951C60C4D1F5D00A5826B /* RecordLayout.h */; };
                DE6954640C5121BD00A5826B /* Token.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE6954630C5121BD00A5826B /* Token.h */; };
                DE704B260D0FBEBE009C7762 /* SemaDeclObjC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE704B250D0FBEBE009C7762 /* SemaDeclObjC.cpp */; };
+               DE704DD20D1668A4009C7762 /* HeaderMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE704DD10D1668A4009C7762 /* HeaderMap.cpp */; };
                DE75ED290B044DC90020CF81 /* ASTContext.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE75ED280B044DC90020CF81 /* ASTContext.h */; };
                DE75EDF10B06880E0020CF81 /* Type.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE75EDF00B06880E0020CF81 /* Type.cpp */; };
                DE928B130C05659200231DA4 /* ModuleBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE928B120C05659200231DA4 /* ModuleBuilder.cpp */; };
                DE6954630C5121BD00A5826B /* Token.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Token.h; sourceTree = "<group>"; };
                DE704B250D0FBEBE009C7762 /* SemaDeclObjC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SemaDeclObjC.cpp; path = Sema/SemaDeclObjC.cpp; sourceTree = "<group>"; };
                DE704BD10D1647E7009C7762 /* HeaderMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeaderMap.h; sourceTree = "<group>"; };
+               DE704DD10D1668A4009C7762 /* HeaderMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HeaderMap.cpp; sourceTree = "<group>"; };
                DE75ED280B044DC90020CF81 /* ASTContext.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ASTContext.h; path = clang/AST/ASTContext.h; sourceTree = "<group>"; };
                DE75EDF00B06880E0020CF81 /* Type.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Type.cpp; path = AST/Type.cpp; sourceTree = "<group>"; };
                DE928B120C05659200231DA4 /* ModuleBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ModuleBuilder.cpp; path = CodeGen/ModuleBuilder.cpp; sourceTree = "<group>"; };
                DED7D78C0A5242E6003AD0FB /* Lex */ = {
                        isa = PBXGroup;
                        children = (
+                               DE704DD10D1668A4009C7762 /* HeaderMap.cpp */,
                                DE344B530AE5E46C00DBC861 /* HeaderSearch.cpp */,
                                DED7D79E0A5242E6003AD0FB /* Lexer.cpp */,
                                1A869AA70BA21ABA008DA07A /* LiteralSupport.cpp */,
                                3580CC0C0D072E5C00C5E4F4 /* LangOptions.cpp in Sources */,
                                353612DA0D075174002E3541 /* TranslationUnit.cpp in Sources */,
                                DE704B260D0FBEBE009C7762 /* SemaDeclObjC.cpp in Sources */,
+                               DE704DD20D1668A4009C7762 /* HeaderMap.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index ffc665094e4d1ada417189fdad532271d5f87001..48e00bf375215b9aa16674a9fbca071c765939ac 100644 (file)
@@ -25,23 +25,19 @@ namespace clang {
 /// symlinks to files.  Its advantages are that it is dense and more efficient
 /// to create and process than a directory of symlinks.
 class HeaderMap {
+  HeaderMap(const HeaderMap&); // DO NOT IMPLEMENT
+  void operator=(const HeaderMap&); // DO NOT IMPLEMENT
 public:
   /// HeaderMap::Create - This attempts to load the specified file as a header
   /// map.  If it doesn't look like a HeaderMap, it gives up and returns null.
   /// If it looks like a HeaderMap but is obviously corrupted, it puts a reason
   /// into the string error argument and returns null.
-  static const HeaderMap *Create(const FileEntry *FE, std::string &ErrorInfo) { 
-    // FIXME: woot!
-    return 0; 
-  }
+  static const HeaderMap *Create(const FileEntry *FE, std::string &ErrorInfo);
   
   /// 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;
-  }
+                              FileManager &FM) const;
     
 };