diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-09-09 17:38:22 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-09-09 17:38:22 +0000 |
commit | 0166c95fddf2045c1fa31612d35329fc18d95b6f (patch) | |
tree | c5b3b37360c8d2b7d899d9d06da7833236ecda29 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 1cf2d54987f009dfb0f72384dea28579fef4a92c (diff) | |
download | bcm5719-llvm-0166c95fddf2045c1fa31612d35329fc18d95b6f.tar.gz bcm5719-llvm-0166c95fddf2045c1fa31612d35329fc18d95b6f.zip |
Frontend: Add -cxx-system-include option which can be used to specify an
explicit list for the C++ system include directories at the -cc1 level, as an
alternative to the horrible AddDefaultCPlusPlusIncludePaths().
llvm-svn: 113505
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 8c644833b20..36d8dad58f7 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -443,6 +443,11 @@ static void HeaderSearchOptsToArgs(const HeaderSearchOptions &Opts, 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]; @@ -1143,6 +1148,7 @@ std::string CompilerInvocation::GetResourcesPath(const char *Argv0, static void ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args) { using namespace cc1options; + Opts.CXXSystemIncludes = Args.getAllArgValues(OPT_cxx_system_include); Opts.Sysroot = Args.getLastArgValue(OPT_isysroot, "/"); Opts.Verbose = Args.hasArg(OPT_v); Opts.UseBuiltinIncludes = !Args.hasArg(OPT_nobuiltininc); |