[cfe-commits] r173409 - in /cfe/trunk: include/clang/Lex/DirectoryLookup.h lib/Frontend/InitHeaderSearch.cpp lib/Lex/PPDirectives.cpp unittests/Lex/PPCallbacksTest.cpp

Daniel Dunbar daniel at zuster.org
Thu Jan 24 17:50:28 PST 2013


Author: ddunbar
Date: Thu Jan 24 19:50:28 2013
New Revision: 173409

URL: http://llvm.org/viewvc/llvm-project?rev=173409&view=rev
Log:
[Lex] Remove DirectoryLookup.UserSpecified, which is unused.

Modified:
    cfe/trunk/include/clang/Lex/DirectoryLookup.h
    cfe/trunk/lib/Frontend/InitHeaderSearch.cpp
    cfe/trunk/lib/Lex/PPDirectives.cpp
    cfe/trunk/unittests/Lex/PPCallbacksTest.cpp

Modified: cfe/trunk/include/clang/Lex/DirectoryLookup.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/DirectoryLookup.h?rev=173409&r1=173408&r2=173409&view=diff
==============================================================================
--- cfe/trunk/include/clang/Lex/DirectoryLookup.h (original)
+++ cfe/trunk/include/clang/Lex/DirectoryLookup.h Thu Jan 24 19:50:28 2013
@@ -50,10 +50,6 @@
   /// SrcMgr::CharacteristicKind.
   unsigned DirCharacteristic : 2;
 
-  /// UserSupplied - True if this is a user-supplied directory.
-  ///
-  bool UserSupplied : 1;
-
   /// LookupType - This indicates whether this DirectoryLookup object is a
   /// normal directory, a framework, or a headermap.
   unsigned LookupType : 2;
@@ -65,8 +61,8 @@
   /// DirectoryLookup ctor - Note that this ctor *does not take ownership* of
   /// 'dir'.
   DirectoryLookup(const DirectoryEntry *dir, SrcMgr::CharacteristicKind DT,
-                  bool isUser, bool isFramework)
-    : DirCharacteristic(DT), UserSupplied(isUser), 
+                  bool isFramework)
+    : DirCharacteristic(DT),
       LookupType(isFramework ? LT_Framework : LT_NormalDir),
       IsIndexHeaderMap(false) {
     u.Dir = dir;
@@ -75,8 +71,8 @@
   /// DirectoryLookup ctor - Note that this ctor *does not take ownership* of
   /// 'map'.
   DirectoryLookup(const HeaderMap *map, SrcMgr::CharacteristicKind DT,
-                  bool isUser, bool isIndexHeaderMap)
-    : DirCharacteristic(DT), UserSupplied(isUser), LookupType(LT_HeaderMap),
+                  bool isIndexHeaderMap)
+    : DirCharacteristic(DT), LookupType(LT_HeaderMap),
       IsIndexHeaderMap(isIndexHeaderMap) {
     u.Map = map;
   }
@@ -119,10 +115,6 @@
     return (SrcMgr::CharacteristicKind)DirCharacteristic;
   }
 
-  /// isUserSupplied - True if this is a user-supplied directory.
-  ///
-  bool isUserSupplied() const { return UserSupplied; }
-
   /// \brief Whether this header map is building a framework or not.
   bool isIndexHeaderMap() const { 
     return isHeaderMap() && IsIndexHeaderMap; 

Modified: cfe/trunk/lib/Frontend/InitHeaderSearch.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitHeaderSearch.cpp?rev=173409&r1=173408&r2=173409&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/InitHeaderSearch.cpp (original)
+++ cfe/trunk/lib/Frontend/InitHeaderSearch.cpp Thu Jan 24 19:50:28 2013
@@ -141,8 +141,8 @@
 
   // If the directory exists, add it.
   if (const DirectoryEntry *DE = FM.getDirectory(MappedPathStr)) {
-    IncludePath.push_back(std::make_pair(Group, DirectoryLookup(DE, Type,
-                          isUserSupplied, isFramework)));
+    IncludePath.push_back(
+      std::make_pair(Group, DirectoryLookup(DE, Type, isFramework)));
     return;
   }
 
@@ -152,8 +152,9 @@
     if (const FileEntry *FE = FM.getFile(MappedPathStr)) {
       if (const HeaderMap *HM = Headers.CreateHeaderMap(FE)) {
         // It is a headermap, add it to the search path.
-        IncludePath.push_back(std::make_pair(Group, DirectoryLookup(HM, Type,
-                              isUserSupplied, Group == IndexHeaderMap)));
+        IncludePath.push_back(
+          std::make_pair(Group,
+                         DirectoryLookup(HM, Type, Group == IndexHeaderMap)));
         return;
       }
     }

Modified: cfe/trunk/lib/Lex/PPDirectives.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPDirectives.cpp?rev=173409&r1=173408&r2=173409&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PPDirectives.cpp (original)
+++ cfe/trunk/lib/Lex/PPDirectives.cpp Thu Jan 24 19:50:28 2013
@@ -1376,7 +1376,7 @@
       if (Callbacks->FileNotFound(Filename, RecoveryPath)) {
         if (const DirectoryEntry *DE = FileMgr.getDirectory(RecoveryPath)) {
           // Add the recovery path to the list of search paths.
-          DirectoryLookup DL(DE, SrcMgr::C_User, true, false);
+          DirectoryLookup DL(DE, SrcMgr::C_User, false);
           HeaderInfo.AddSearchPath(DL, isAngled);
           
           // Try the lookup again, skipping the cache.

Modified: cfe/trunk/unittests/Lex/PPCallbacksTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Lex/PPCallbacksTest.cpp?rev=173409&r1=173408&r2=173409&view=diff
==============================================================================
--- cfe/trunk/unittests/Lex/PPCallbacksTest.cpp (original)
+++ cfe/trunk/unittests/Lex/PPCallbacksTest.cpp Thu Jan 24 19:50:28 2013
@@ -109,7 +109,7 @@
       // Add header's parent path to search path.
       StringRef SearchPath = path::parent_path(HeaderPath);
       const DirectoryEntry *DE = FileMgr.getDirectory(SearchPath);
-      DirectoryLookup DL(DE, SrcMgr::C_User, true, false);
+      DirectoryLookup DL(DE, SrcMgr::C_User, false);
       HeaderInfo.AddSearchPath(DL, IsSystemHeader);
   }
 





More information about the cfe-commits mailing list