On Thu, Oct 23, 2014 at 8:24 PM, Saleem Abdulrasool <[email protected]> wrote: > +void CrossWindowsToolChain:: > +AddClangCXXStdlibIncludeArgs(const llvm::opt::ArgList &DriverArgs, > + llvm::opt::ArgStringList &CC1Args) const { > + const llvm::Triple &Triple = getTriple(); > + const std::string &SysRoot = getDriver().SysRoot; > + > + if (DriverArgs.hasArg(options::OPT_nostdlibinc) || > + DriverArgs.hasArg(options::OPT_nostdincxx)) > + return; > + > + switch (GetCXXStdlibType(DriverArgs)) { > + case ToolChain::CST_Libcxx: > + addSystemInclude(DriverArgs, CC1Args, SysRoot + "/usr/include/c++/v1"); > + break; > + > + case ToolChain::CST_Libstdcxx: > + addSystemInclude(DriverArgs, CC1Args, SysRoot + "/usr/incldue/c++"); > + switch (Triple.getArch()) { > + default: llvm_unreachable("unsupported architecture");
It shouldn't be this easy for users to trip assertions or hit unreachable code. I think adding /usr/include/c++/Triple to the include search path, and letting users debug any fallout from that is probably reasonable. > + case llvm::Triple::x86: > + case llvm::Triple::x86_64: > + addSystemInclude(DriverArgs, CC1Args, > + SysRoot + "/usr/include/c++/" + Triple.str()); > + break; > + } > + addSystemInclude(DriverArgs, CC1Args, > + SysRoot + "/usr/include/c++/backwards"); > + } > +} _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
