Skip to content

Commit 8e2f5f9

Browse files
committed
[Driver] Simplify mips multilib path and fix comments. NFC
1 parent 7f76c70 commit 8e2f5f9

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

clang/lib/Driver/ToolChains/Gnu.cpp

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2766,15 +2766,6 @@ bool Generic_GCC::IsIntegratedAssemblerDefault() const {
27662766
}
27672767
}
27682768

2769-
static void addMultilibsFilePaths(const Driver &D, const MultilibSet &Multilibs,
2770-
const Multilib &Multilib,
2771-
StringRef InstallPath,
2772-
ToolChain::path_list &Paths) {
2773-
if (const auto &PathsCallback = Multilibs.filePathsCallback())
2774-
for (const auto &Path : PathsCallback(Multilib))
2775-
addPathIfExists(D, InstallPath + Path, Paths);
2776-
}
2777-
27782769
void Generic_GCC::PushPPaths(ToolChain::path_list &PPaths) {
27792770
// Cross-compiling binutils and GCC installations (vanilla and openSUSE at
27802771
// least) put various tools in a triple-prefixed directory off of the parent
@@ -2801,12 +2792,13 @@ void Generic_GCC::AddMultilibPaths(const Driver &D,
28012792
const std::string &LibPath =
28022793
std::string(GCCInstallation.getParentLibPath());
28032794

2804-
// Add toolchain / multilib specific file paths.
2805-
addMultilibsFilePaths(D, Multilibs, SelectedMultilib,
2806-
GCCInstallation.getInstallPath(), Paths);
2807-
28082795
// Sourcery CodeBench MIPS toolchain holds some libraries under
28092796
// a biarch-like suffix of the GCC installation.
2797+
if (const auto &PathsCallback = Multilibs.filePathsCallback())
2798+
for (const auto &Path : PathsCallback(SelectedMultilib))
2799+
addPathIfExists(D, GCCInstallation.getInstallPath() + Path, Paths);
2800+
2801+
// Add lib/gcc/$triple/$version, with an optional /multilib suffix.
28102802
addPathIfExists(
28112803
D, GCCInstallation.getInstallPath() + SelectedMultilib.gccSuffix(),
28122804
Paths);

0 commit comments

Comments
 (0)