On Fri, Oct 24, 2014 at 11:19 AM, Reid Kleckner <[email protected]> wrote:
> 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. Fair enough; changed to assume that the path exists in SVN r220624. > > + 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"); > > + } > > +} > -- Saleem Abdulrasool compnerd (at) compnerd (dot) org
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
