[clang] 01b6f06 - Fix test Driver/mips-mti-linux.c
Michael Platings via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 14 00:30:41 PDT 2023
Author: Michael Platings
Date: 2023-06-14T08:30:03+01:00
New Revision: 01b6f06263dd0a3db61c1bf0e6a3464c7cbd7ea2
URL: https://github.com/llvm/llvm-project/commit/01b6f06263dd0a3db61c1bf0e6a3464c7cbd7ea2
DIFF: https://github.com/llvm/llvm-project/commit/01b6f06263dd0a3db61c1bf0e6a3464c7cbd7ea2.diff
LOG: Fix test Driver/mips-mti-linux.c
Added:
Modified:
clang/lib/Driver/ToolChains/MipsLinux.cpp
clang/lib/Driver/ToolChains/MipsLinux.h
Removed:
################################################################################
diff --git a/clang/lib/Driver/ToolChains/MipsLinux.cpp b/clang/lib/Driver/ToolChains/MipsLinux.cpp
index 6157970233ae5..eacdcbf730b62 100644
--- a/clang/lib/Driver/ToolChains/MipsLinux.cpp
+++ b/clang/lib/Driver/ToolChains/MipsLinux.cpp
@@ -56,7 +56,7 @@ void MipsLLVMToolChain::AddClangSystemIncludeArgs(
const auto &Callback = Multilibs.includeDirsCallback();
if (Callback) {
- for (const auto &Path : Callback(SelectedMultilib))
+ for (const auto &Path : Callback(SelectedMultilibs.back()))
addExternCSystemIncludeIfExists(DriverArgs, CC1Args,
D.getInstalledDir() + Path);
}
@@ -68,11 +68,11 @@ Tool *MipsLLVMToolChain::buildLinker() const {
std::string MipsLLVMToolChain::computeSysRoot() const {
if (!getDriver().SysRoot.empty())
- return getDriver().SysRoot + SelectedMultilib.osSuffix();
+ return getDriver().SysRoot + SelectedMultilibs.back().osSuffix();
const std::string InstalledDir(getDriver().getInstalledDir());
std::string SysRootPath =
- InstalledDir + "/../sysroot" + SelectedMultilib.osSuffix();
+ InstalledDir + "/../sysroot" + SelectedMultilibs.back().osSuffix();
if (llvm::sys::fs::exists(SysRootPath))
return SysRootPath;
@@ -96,7 +96,7 @@ 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)) {
+ for (std::string Path : Callback(SelectedMultilibs.back())) {
Path = getDriver().getInstalledDir() + Path + "/c++/v1";
if (llvm::sys::fs::exists(Path)) {
addSystemInclude(DriverArgs, CC1Args, Path);
@@ -122,7 +122,7 @@ std::string MipsLLVMToolChain::getCompilerRT(const ArgList &Args,
StringRef Component,
FileType Type) const {
SmallString<128> Path(getDriver().ResourceDir);
- llvm::sys::path::append(Path, SelectedMultilib.osSuffix(), "lib" + LibSuffix,
+ llvm::sys::path::append(Path, SelectedMultilibs.back().osSuffix(), "lib" + LibSuffix,
getOS());
const char *Suffix;
switch (Type) {
diff --git a/clang/lib/Driver/ToolChains/MipsLinux.h b/clang/lib/Driver/ToolChains/MipsLinux.h
index 31b547c0063ca..a968804f2a6ec 100644
--- a/clang/lib/Driver/ToolChains/MipsLinux.h
+++ b/clang/lib/Driver/ToolChains/MipsLinux.h
@@ -53,7 +53,6 @@ class LLVM_LIBRARY_VISIBILITY MipsLLVMToolChain : public Linux {
}
private:
- Multilib SelectedMultilib;
std::string LibSuffix;
};
More information about the cfe-commits
mailing list