[cfe-commits] r39033 - in /cfe/cfe/trunk/include/clang/Lex: DirectoryLookup.h HeaderSearch.h

sabre at cs.uiuc.edu sabre at cs.uiuc.edu
Wed Jul 11 09:26:59 PDT 2007


Author: sabre
Date: Wed Jul 11 11:26:59 2007
New Revision: 39033

URL: http://llvm.org/viewvc/llvm-project?rev=39033&view=rev
Log:
Split the DirectoryLookup class out to its own header.

Added:
    cfe/cfe/trunk/include/clang/Lex/DirectoryLookup.h   (with props)
Modified:
    cfe/cfe/trunk/include/clang/Lex/HeaderSearch.h

Added: cfe/cfe/trunk/include/clang/Lex/DirectoryLookup.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/include/clang/Lex/DirectoryLookup.h?rev=39033&view=auto

==============================================================================
--- cfe/cfe/trunk/include/clang/Lex/DirectoryLookup.h (added)
+++ cfe/cfe/trunk/include/clang/Lex/DirectoryLookup.h Wed Jul 11 11:26:59 2007
@@ -0,0 +1,72 @@
+//===--- DirectoryLookup.h - Info for searching for headers -----*- C++ -*-===//
+//
+//                     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 defines the DirectoryLookup interface.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_LEX_DIRECTORYLOOKUP_H
+#define LLVM_CLANG_LEX_DIRECTORYLOOKUP_H
+
+namespace llvm {
+namespace clang {
+class DirectoryEntry;
+
+/// DirectoryLookup - This class is used to specify the search order for
+/// directories in #include directives.
+class DirectoryLookup {
+public:
+  enum DirType {
+    NormalHeaderDir,
+    SystemHeaderDir,
+    ExternCSystemHeaderDir
+  };
+private:  
+  /// Dir - This is the actual directory that we're referring to.
+  ///
+  const DirectoryEntry *Dir;
+  
+  /// DirCharacteristic - The type of directory this is, one of the DirType enum
+  /// values.
+  DirType DirCharacteristic : 2;
+  
+  /// UserSupplied - True if this is a user-supplied directory.
+  ///
+  bool UserSupplied : 1;
+  
+  /// Framework - True if this is a framework directory search-path.
+  ///
+  bool Framework : 1;
+public:
+  DirectoryLookup(const DirectoryEntry *dir, DirType DT, bool isUser,
+                  bool isFramework)
+    : Dir(dir), DirCharacteristic(DT), UserSupplied(isUser),
+      Framework(isFramework) {}
+  
+  /// getDir - Return the directory that this entry refers to.
+  ///
+  const DirectoryEntry *getDir() const { return Dir; }
+  
+  /// DirCharacteristic - The type of directory this is, one of the DirType enum
+  /// values.
+  DirType getDirCharacteristic() const { return DirCharacteristic; }
+  
+  /// isUserSupplied - True if this is a user-supplied directory.
+  ///
+  bool isUserSupplied() const { return UserSupplied; }
+  
+  /// isFramework - True if this is a framework directory.
+  ///
+  bool isFramework() const { return Framework; }
+};
+
+}  // end namespace llvm
+}  // end namespace clang
+
+#endif

Propchange: cfe/cfe/trunk/include/clang/Lex/DirectoryLookup.h

------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cfe/cfe/trunk/include/clang/Lex/DirectoryLookup.h

------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: cfe/cfe/trunk/include/clang/Lex/HeaderSearch.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/include/clang/Lex/HeaderSearch.h?rev=39033&r1=39032&r2=39033&view=diff

==============================================================================
--- cfe/cfe/trunk/include/clang/Lex/HeaderSearch.h (original)
+++ cfe/cfe/trunk/include/clang/Lex/HeaderSearch.h Wed Jul 11 11:26:59 2007
@@ -7,72 +7,24 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// This file defines the DirectoryLookup and HeaderSearch interfaces.
+// This file defines the HeaderSearch interface.
 //
 //===----------------------------------------------------------------------===//
 
 #ifndef LLVM_CLANG_LEX_HEADERSEARCH_H
 #define LLVM_CLANG_LEX_HEADERSEARCH_H
 
+#include "clang/Lex/DirectoryLookup.h"
 #include <vector>
 #include <string>
 #include <map>
 
 namespace llvm {
 namespace clang {
-class DirectoryEntry;
 class FileEntry;
 class FileManager;
 class IdentifierInfo;
 
-/// DirectoryLookup - This class is used to specify the search order for
-/// directories in #include directives.
-class DirectoryLookup {
-public:
-  enum DirType {
-    NormalHeaderDir,
-    SystemHeaderDir,
-    ExternCSystemHeaderDir
-  };
-private:  
-  /// Dir - This is the actual directory that we're referring to.
-  ///
-  const DirectoryEntry *Dir;
-  
-  /// DirCharacteristic - The type of directory this is, one of the DirType enum
-  /// values.
-  DirType DirCharacteristic : 2;
-  
-  /// UserSupplied - True if this is a user-supplied directory.
-  ///
-  bool UserSupplied : 1;
-  
-  /// Framework - True if this is a framework directory search-path.
-  ///
-  bool Framework : 1;
-public:
-  DirectoryLookup(const DirectoryEntry *dir, DirType DT, bool isUser,
-                  bool isFramework)
-    : Dir(dir), DirCharacteristic(DT), UserSupplied(isUser),
-      Framework(isFramework) {}
-  
-  /// getDir - Return the directory that this entry refers to.
-  ///
-  const DirectoryEntry *getDir() const { return Dir; }
-  
-  /// DirCharacteristic - The type of directory this is, one of the DirType enum
-  /// values.
-  DirType getDirCharacteristic() const { return DirCharacteristic; }
-  
-  /// isUserSupplied - True if this is a user-supplied directory.
-  ///
-  bool isUserSupplied() const { return UserSupplied; }
-  
-  /// isFramework - True if this is a framework directory.
-  ///
-  bool isFramework() const { return Framework; }
-};
-
   
 /// HeaderSearch - This class encapsulates the information needed to find the
 /// file referenced by a #include or #include_next, (sub-)framework lookup, etc.





More information about the cfe-commits mailing list