diff options
author | Petr Hosek <phosek@chromium.org> | 2018-04-10 19:55:55 +0000 |
---|---|---|
committer | Petr Hosek <phosek@chromium.org> | 2018-04-10 19:55:55 +0000 |
commit | 8d612149db286d97fdbe10191c13792f41283211 (patch) | |
tree | 5e118f7da1a322845162ca5b0a12d50237421e13 /clang/lib/Driver/ToolChains/MipsLinux.cpp | |
parent | 5eae06f21d52d4c1366625f3931c554699b761c1 (diff) | |
download | bcm5719-llvm-8d612149db286d97fdbe10191c13792f41283211.tar.gz bcm5719-llvm-8d612149db286d97fdbe10191c13792f41283211.zip |
[Driver] Allow drivers to add multiple libc++ include paths
This allows toolchain drivers to add multiple libc++ include paths akin
to libstdc++. This is useful in multiarch setup when some headers might
be in target specific include directory. There should be no functional
change.
Differential Revision: https://reviews.llvm.org/D45422
llvm-svn: 329748
Diffstat (limited to 'clang/lib/Driver/ToolChains/MipsLinux.cpp')
-rw-r--r-- | clang/lib/Driver/ToolChains/MipsLinux.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/Driver/ToolChains/MipsLinux.cpp b/clang/lib/Driver/ToolChains/MipsLinux.cpp index b394208336e..2f1c8b2f0c7 100644 --- a/clang/lib/Driver/ToolChains/MipsLinux.cpp +++ b/clang/lib/Driver/ToolChains/MipsLinux.cpp @@ -94,16 +94,18 @@ MipsLLVMToolChain::GetCXXStdlibType(const ArgList &Args) const { return ToolChain::CST_Libcxx; } -std::string MipsLLVMToolChain::findLibCxxIncludePath() const { +void MipsLLVMToolChain::addLibCxxIncludePaths( + const llvm::opt::ArgList &DriverArgs, + llvm::opt::ArgStringList &CC1Args) const { if (const auto &Callback = Multilibs.includeDirsCallback()) { for (std::string Path : Callback(SelectedMultilib)) { Path = getDriver().getInstalledDir() + Path + "/c++/v1"; if (llvm::sys::fs::exists(Path)) { - return Path; + addSystemInclude(DriverArgs, CC1Args, Path); + return; } } } - return ""; } void MipsLLVMToolChain::AddCXXStdlibLibArgs(const ArgList &Args, |