[Frontend] Remove another IsUserSpecified member variable that is now unused.
authorDaniel Dunbar <daniel@zuster.org>
Fri, 25 Jan 2013 01:50:47 +0000 (01:50 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Fri, 25 Jan 2013 01:50:47 +0000 (01:50 +0000)
llvm-svn: 173412

clang/include/clang/Lex/HeaderSearchOptions.h
clang/lib/Frontend/CompilerInvocation.cpp
clang/lib/Serialization/ASTReader.cpp
clang/lib/Serialization/ASTWriter.cpp

index 1d7534e..5288563 100644 (file)
@@ -43,7 +43,6 @@ public:
   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 @@ public:
     ///
     /// 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 @@ public:
 
   /// 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));
   }
 
index 52707db..9c965c0 100644 (file)
@@ -830,7 +830,7 @@ static void ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args) {
     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 @@ static void ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args) {
       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 @@ static void ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args) {
                     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.
index 38ff300..d8d5e66 100644 (file)
@@ -3676,14 +3676,13 @@ bool ASTReader::ParseHeaderSearchOptions(const RecordData &Record,
     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.
index 2f9e154..5a690b3 100644 (file)
@@ -1111,7 +1111,6 @@ void ASTWriter::WriteControlBlock(Preprocessor &PP, ASTContext &Context,
     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);