[cfe-commits] r89035 - in /cfe/trunk: include/clang/Frontend/HeaderSearchOptions.h lib/Frontend/InitHeaderSearch.cpp tools/clang-cc/Options.cpp
Daniel Dunbar
daniel at zuster.org
Mon Nov 16 21:04:16 PST 2009
Author: ddunbar
Date: Mon Nov 16 23:04:15 2009
New Revision: 89035
URL: http://llvm.org/viewvc/llvm-project?rev=89035&view=rev
Log:
Remove unused IsCXXAware and IgnoreSysRoots option from HeaderSearchOptions::Entry.
Modified:
cfe/trunk/include/clang/Frontend/HeaderSearchOptions.h
cfe/trunk/lib/Frontend/InitHeaderSearch.cpp
cfe/trunk/tools/clang-cc/Options.cpp
Modified: cfe/trunk/include/clang/Frontend/HeaderSearchOptions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/HeaderSearchOptions.h?rev=89035&r1=89034&r2=89035&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/HeaderSearchOptions.h (original)
+++ cfe/trunk/include/clang/Frontend/HeaderSearchOptions.h Mon Nov 16 23:04:15 2009
@@ -33,17 +33,13 @@
struct Entry {
std::string Path;
frontend::IncludeDirGroup Group;
- unsigned IsCXXAware : 1;
unsigned IsUserSupplied : 1;
unsigned IsFramework : 1;
- unsigned IgnoreSysRoot : 1;
Entry(llvm::StringRef _Path, frontend::IncludeDirGroup _Group,
- bool _IsCXXAware, bool _IsUserSupplied, bool _IsFramework,
- bool _IgnoreSysRoot)
- : Path(_Path), Group(_Group), IsCXXAware(_IsCXXAware),
- IsUserSupplied(_IsUserSupplied), IsFramework(_IsFramework),
- IgnoreSysRoot(_IgnoreSysRoot) {}
+ bool _IsUserSupplied, bool _IsFramework)
+ : Path(_Path), Group(_Group), IsUserSupplied(_IsUserSupplied),
+ IsFramework(_IsFramework) {}
};
/// If non-empty, the directory to use as a "virtual system root" for include
@@ -81,10 +77,8 @@
/// AddPath - Add the \arg Path path to the specified \arg Group list.
void AddPath(llvm::StringRef Path, frontend::IncludeDirGroup Group,
- bool IsCXXAware, bool IsUserSupplied,
- bool IsFramework, bool IgnoreSysRoot = false) {
- UserEntries.push_back(Entry(Path, Group, IsCXXAware, IsUserSupplied,
- IsFramework, IgnoreSysRoot));
+ bool IsUserSupplied, bool IsFramework) {
+ UserEntries.push_back(Entry(Path, Group, IsUserSupplied, IsFramework));
}
};
Modified: cfe/trunk/lib/Frontend/InitHeaderSearch.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitHeaderSearch.cpp?rev=89035&r1=89034&r2=89035&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/InitHeaderSearch.cpp (original)
+++ cfe/trunk/lib/Frontend/InitHeaderSearch.cpp Mon Nov 16 23:04:15 2009
@@ -630,8 +630,8 @@
// Add the user defined entries.
for (unsigned i = 0, e = HSOpts.UserEntries.size(); i != e; ++i) {
const HeaderSearchOptions::Entry &E = HSOpts.UserEntries[i];
- Init.AddPath(E.Path, E.Group, E.IsCXXAware, E.IsUserSupplied, E.IsFramework,
- E.IgnoreSysRoot);
+ Init.AddPath(E.Path, E.Group, false, E.IsUserSupplied, E.IsFramework,
+ false);
}
// Add entries from CPATH and friends.
Modified: cfe/trunk/tools/clang-cc/Options.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-cc/Options.cpp?rev=89035&r1=89034&r2=89035&view=diff
==============================================================================
--- cfe/trunk/tools/clang-cc/Options.cpp (original)
+++ cfe/trunk/tools/clang-cc/Options.cpp Mon Nov 16 23:04:15 2009
@@ -920,32 +920,31 @@
unsigned Iidx = 0, Fidx = 0;
while (Iidx < I_dirs.size() && Fidx < F_dirs.size()) {
if (I_dirs.getPosition(Iidx) < F_dirs.getPosition(Fidx)) {
- Opts.AddPath(I_dirs[Iidx], frontend::Angled, false, true, false);
+ Opts.AddPath(I_dirs[Iidx], frontend::Angled, true, false);
++Iidx;
} else {
- Opts.AddPath(F_dirs[Fidx], frontend::Angled, false, true, true);
+ Opts.AddPath(F_dirs[Fidx], frontend::Angled, true, true);
++Fidx;
}
}
// Consume what's left from whatever list was longer.
for (; Iidx != I_dirs.size(); ++Iidx)
- Opts.AddPath(I_dirs[Iidx], frontend::Angled, false, true, false);
+ Opts.AddPath(I_dirs[Iidx], frontend::Angled, true, false);
for (; Fidx != F_dirs.size(); ++Fidx)
- Opts.AddPath(F_dirs[Fidx], frontend::Angled, false, true, true);
+ Opts.AddPath(F_dirs[Fidx], frontend::Angled, true, true);
// Handle -idirafter... options.
for (unsigned i = 0, e = idirafter_dirs.size(); i != e; ++i)
- Opts.AddPath(idirafter_dirs[i], frontend::After,
- false, true, false);
+ Opts.AddPath(idirafter_dirs[i], frontend::After, true, false);
// Handle -iquote... options.
for (unsigned i = 0, e = iquote_dirs.size(); i != e; ++i)
- Opts.AddPath(iquote_dirs[i], frontend::Quoted, false, true, false);
+ Opts.AddPath(iquote_dirs[i], frontend::Quoted, true, false);
// Handle -isystem... options.
for (unsigned i = 0, e = isystem_dirs.size(); i != e; ++i)
- Opts.AddPath(isystem_dirs[i], frontend::System, false, true, false);
+ Opts.AddPath(isystem_dirs[i], frontend::System, true, false);
// Walk the -iprefix/-iwithprefix/-iwithprefixbefore argument lists in
// parallel, processing the values in order of occurance to get the right
@@ -974,12 +973,12 @@
iwithprefix_vals.getPosition(iwithprefix_idx) <
iwithprefixbefore_vals.getPosition(iwithprefixbefore_idx))) {
Opts.AddPath(Prefix+iwithprefix_vals[iwithprefix_idx],
- frontend::System, false, false, false);
+ frontend::System, false, false);
++iwithprefix_idx;
iwithprefix_done = iwithprefix_idx == iwithprefix_vals.size();
} else {
Opts.AddPath(Prefix+iwithprefixbefore_vals[iwithprefixbefore_idx],
- frontend::Angled, false, false, false);
+ frontend::Angled, false, false);
++iwithprefixbefore_idx;
iwithprefixbefore_done =
iwithprefixbefore_idx == iwithprefixbefore_vals.size();
More information about the cfe-commits
mailing list