[cfe-commits] r173412 - in /cfe/trunk: include/clang/Lex/HeaderSearchOptions.h lib/Frontend/CompilerInvocation.cpp lib/Serialization/ASTReader.cpp lib/Serialization/ASTWriter.cpp

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


Author: ddunbar
Date: Thu Jan 24 19:50:47 2013
New Revision: 173412

URL: http://llvm.org/viewvc/llvm-project?rev=173412&view=rev
Log:
[Frontend] Remove another IsUserSpecified member variable that is now unused.

Modified:
    cfe/trunk/include/clang/Lex/HeaderSearchOptions.h
    cfe/trunk/lib/Frontend/CompilerInvocation.cpp
    cfe/trunk/lib/Serialization/ASTReader.cpp
    cfe/trunk/lib/Serialization/ASTWriter.cpp

Modified: cfe/trunk/include/clang/Lex/HeaderSearchOptions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/HeaderSearchOptions.h?rev=173412&r1=173411&r2=173412&view=diff
==============================================================================
--- cfe/trunk/include/clang/Lex/HeaderSearchOptions.h (original)
+++ cfe/trunk/include/clang/Lex/HeaderSearchOptions.h Thu Jan 24 19:50:47 2013
@@ -43,7 +43,6 @@
   struct Entry {
     std::string Path;
     frontend::IncludeDirGroup Group;
-    unsigned IsUserSupplied : 1;
     unsigned IsFramework : 1;
     
     /// IgnoreSysRoot - This is false if an absolute path should be treated
@@ -55,20 +54,18 @@
     ///
     /// This typically indicates that users didn't directly provide it, but
     /// instead it was provided by a compatibility layer for a particular
-    /// system. This isn't redundant with IsUserSupplied (even though perhaps
-    /// it should be) because that is false for user provided '-iwithprefix'
-    /// header search entries.
+    /// system.
     unsigned IsInternal : 1;
 
     /// \brief True if this entry's headers should be wrapped in extern "C".
     unsigned ImplicitExternC : 1;
 
     Entry(StringRef path, frontend::IncludeDirGroup group,
-          bool isUserSupplied, bool isFramework, bool ignoreSysRoot,
-          bool isInternal, bool implicitExternC)
-      : Path(path), Group(group), IsUserSupplied(isUserSupplied),
-        IsFramework(isFramework), IgnoreSysRoot(ignoreSysRoot),
-        IsInternal(isInternal), ImplicitExternC(implicitExternC) {}
+          bool isFramework, bool ignoreSysRoot, bool isInternal,
+          bool implicitExternC)
+      : Path(path), Group(group), IsFramework(isFramework),
+        IgnoreSysRoot(ignoreSysRoot), IsInternal(isInternal),
+        ImplicitExternC(implicitExternC) {}
   };
 
   struct SystemHeaderPrefix {
@@ -129,9 +126,9 @@
 
   /// AddPath - Add the \p Path path to the specified \p Group list.
   void AddPath(StringRef Path, frontend::IncludeDirGroup Group,
-               bool IsUserSupplied, bool IsFramework, bool IgnoreSysRoot,
+               bool IsFramework, bool IgnoreSysRoot,
                bool IsInternal = false, bool ImplicitExternC = false) {
-    UserEntries.push_back(Entry(Path, Group, IsUserSupplied, IsFramework,
+    UserEntries.push_back(Entry(Path, Group, IsFramework,
                                 IgnoreSysRoot, IsInternal, ImplicitExternC));
   }
 

Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=173412&r1=173411&r2=173412&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Thu Jan 24 19:50:47 2013
@@ -830,7 +830,7 @@
     frontend::IncludeDirGroup Group 
       = IsIndexHeaderMap? frontend::IndexHeaderMap : frontend::Angled;
     
-    Opts.AddPath((*it)->getValue(), Group, true,
+    Opts.AddPath((*it)->getValue(), Group,
                  /*IsFramework=*/ (*it)->getOption().matches(OPT_F), false);
     IsIndexHeaderMap = false;
   }
@@ -845,41 +845,39 @@
       Prefix = A->getValue();
     else if (A->getOption().matches(OPT_iwithprefix))
       Opts.AddPath(Prefix.str() + A->getValue(),
-                   frontend::After, false, false, false);
+                   frontend::After, false, false);
     else
       Opts.AddPath(Prefix.str() + A->getValue(),
-                   frontend::Angled, false, false, false);
+                   frontend::Angled, false, false);
   }
 
   for (arg_iterator it = Args.filtered_begin(OPT_idirafter),
          ie = Args.filtered_end(); it != ie; ++it)
-    Opts.AddPath((*it)->getValue(), frontend::After, true, false, false);
+    Opts.AddPath((*it)->getValue(), frontend::After, false, false);
   for (arg_iterator it = Args.filtered_begin(OPT_iquote),
          ie = Args.filtered_end(); it != ie; ++it)
-    Opts.AddPath((*it)->getValue(), frontend::Quoted, true, false, false);
+    Opts.AddPath((*it)->getValue(), frontend::Quoted, false, false);
   for (arg_iterator it = Args.filtered_begin(OPT_isystem,
          OPT_iwithsysroot), ie = Args.filtered_end(); it != ie; ++it)
-    Opts.AddPath((*it)->getValue(), frontend::System, true, false,
+    Opts.AddPath((*it)->getValue(), frontend::System, false,
                  !(*it)->getOption().matches(OPT_iwithsysroot));
   for (arg_iterator it = Args.filtered_begin(OPT_iframework),
          ie = Args.filtered_end(); it != ie; ++it)
-    Opts.AddPath((*it)->getValue(), frontend::System, true, true,
-                 true);
+    Opts.AddPath((*it)->getValue(), frontend::System, true, true);
 
   // Add the paths for the various language specific isystem flags.
   for (arg_iterator it = Args.filtered_begin(OPT_c_isystem),
        ie = Args.filtered_end(); it != ie; ++it)
-    Opts.AddPath((*it)->getValue(), frontend::CSystem, true, false, true);
+    Opts.AddPath((*it)->getValue(), frontend::CSystem, false, true);
   for (arg_iterator it = Args.filtered_begin(OPT_cxx_isystem),
        ie = Args.filtered_end(); it != ie; ++it)
-    Opts.AddPath((*it)->getValue(), frontend::CXXSystem, true, false, true);
+    Opts.AddPath((*it)->getValue(), frontend::CXXSystem, false, true);
   for (arg_iterator it = Args.filtered_begin(OPT_objc_isystem),
        ie = Args.filtered_end(); it != ie; ++it)
-    Opts.AddPath((*it)->getValue(), frontend::ObjCSystem, true, false,true);
+    Opts.AddPath((*it)->getValue(), frontend::ObjCSystem, false,true);
   for (arg_iterator it = Args.filtered_begin(OPT_objcxx_isystem),
        ie = Args.filtered_end(); it != ie; ++it)
-    Opts.AddPath((*it)->getValue(), frontend::ObjCXXSystem, true, false,
-                 true);
+    Opts.AddPath((*it)->getValue(), frontend::ObjCXXSystem, false, true);
 
   // Add the internal paths from a driver that detects standard include paths.
   for (arg_iterator I = Args.filtered_begin(OPT_internal_isystem,
@@ -887,7 +885,7 @@
                     E = Args.filtered_end();
        I != E; ++I)
     Opts.AddPath((*I)->getValue(), frontend::System,
-                 false, false, /*IgnoreSysRoot=*/true, /*IsInternal=*/true,
+                 false, /*IgnoreSysRoot=*/true, /*IsInternal=*/true,
                  (*I)->getOption().matches(OPT_internal_externc_isystem));
 
   // Add the path prefixes which are implicitly treated as being system headers.

Modified: cfe/trunk/lib/Serialization/ASTReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=173412&r1=173411&r2=173412&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReader.cpp Thu Jan 24 19:50:47 2013
@@ -3676,14 +3676,13 @@
     std::string Path = ReadString(Record, Idx);
     frontend::IncludeDirGroup Group
       = static_cast<frontend::IncludeDirGroup>(Record[Idx++]);
-    bool IsUserSupplied = Record[Idx++];
     bool IsFramework = Record[Idx++];
     bool IgnoreSysRoot = Record[Idx++];
     bool IsInternal = Record[Idx++];
     bool ImplicitExternC = Record[Idx++];
     HSOpts.UserEntries.push_back(
-      HeaderSearchOptions::Entry(Path, Group, IsUserSupplied, IsFramework,
-                                 IgnoreSysRoot, IsInternal, ImplicitExternC));
+      HeaderSearchOptions::Entry(Path, Group, IsFramework, IgnoreSysRoot,
+                                 IsInternal, ImplicitExternC));
   }
 
   // System header prefixes.

Modified: cfe/trunk/lib/Serialization/ASTWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriter.cpp?rev=173412&r1=173411&r2=173412&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTWriter.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTWriter.cpp Thu Jan 24 19:50:47 2013
@@ -1111,7 +1111,6 @@
     const HeaderSearchOptions::Entry &Entry = HSOpts.UserEntries[I];
     AddString(Entry.Path, Record);
     Record.push_back(static_cast<unsigned>(Entry.Group));
-    Record.push_back(Entry.IsUserSupplied);
     Record.push_back(Entry.IsFramework);
     Record.push_back(Entry.IgnoreSysRoot);
     Record.push_back(Entry.IsInternal);





More information about the cfe-commits mailing list