/// User specified include entries.
std::vector<Entry> UserEntries;
- /// If non-empty, the list of C++ standard include paths to use.
- std::vector<std::string> CXXSystemIncludes;
-
/// A (system-path) delimited list of include paths to be added from the
/// environment following the user specified includes (but prior to builtin
/// and standard includes). This is parsed in the same manner as the CPATH
switch (Type) {
case ToolChain::CST_Libcxx:
- CmdArgs.push_back("-cxx-system-include");
+ CmdArgs.push_back("-nostdinc++");
+ CmdArgs.push_back("-cxx-isystem");
CmdArgs.push_back("/usr/include/c++/v1");
break;
Res.push_back(Opts.Sysroot);
}
- for (unsigned i = 0, e = Opts.CXXSystemIncludes.size(); i != e; ++i) {
- Res.push_back("-cxx-system-include");
- Res.push_back(Opts.CXXSystemIncludes[i]);
- }
-
/// User specified include entries.
for (unsigned i = 0, e = Opts.UserEntries.size(); i != e; ++i) {
const HeaderSearchOptions::Entry &E = Opts.UserEntries[i];
void InitHeaderSearch::AddDefaultSystemIncludePaths(const LangOptions &Lang,
const llvm::Triple &triple,
const HeaderSearchOptions &HSOpts) {
- if (Lang.CPlusPlus && HSOpts.UseStandardCXXIncludes) {
- if (!HSOpts.CXXSystemIncludes.empty()) {
- for (unsigned i = 0, e = HSOpts.CXXSystemIncludes.size(); i != e; ++i)
- AddPath(HSOpts.CXXSystemIncludes[i], CXXSystem, true, false, false);
- } else
- AddDefaultCPlusPlusIncludePaths(triple);
- }
+ if (Lang.CPlusPlus && HSOpts.UseStandardCXXIncludes)
+ AddDefaultCPlusPlusIncludePaths(triple);
AddDefaultCIncludePaths(triple, HSOpts);