Delete a simplistic helper function now that llvm::Triple can provide
this functionality. llvm-svn: 150358
This commit is contained in:
parent
0826c17d00
commit
779579b332
|
@ -1091,18 +1091,6 @@ bool Generic_GCC::GCCVersion::operator<(const GCCVersion &RHS) const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: Factor this helper into llvm::Triple itself.
|
|
||||||
static llvm::Triple getMultiarchAlternateTriple(llvm::Triple Triple) {
|
|
||||||
switch (Triple.getArch()) {
|
|
||||||
default: break;
|
|
||||||
case llvm::Triple::x86: Triple.setArchName("x86_64"); break;
|
|
||||||
case llvm::Triple::x86_64: Triple.setArchName("i386"); break;
|
|
||||||
case llvm::Triple::ppc: Triple.setArchName("powerpc64"); break;
|
|
||||||
case llvm::Triple::ppc64: Triple.setArchName("powerpc"); break;
|
|
||||||
}
|
|
||||||
return Triple;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// \brief Construct a GCCInstallationDetector from the driver.
|
/// \brief Construct a GCCInstallationDetector from the driver.
|
||||||
///
|
///
|
||||||
/// This performs all of the autodetection and sets up the various paths.
|
/// This performs all of the autodetection and sets up the various paths.
|
||||||
|
@ -1116,7 +1104,9 @@ Generic_GCC::GCCInstallationDetector::GCCInstallationDetector(
|
||||||
const Driver &D,
|
const Driver &D,
|
||||||
const llvm::Triple &TargetTriple)
|
const llvm::Triple &TargetTriple)
|
||||||
: IsValid(false) {
|
: IsValid(false) {
|
||||||
llvm::Triple MultiarchTriple = getMultiarchAlternateTriple(TargetTriple);
|
llvm::Triple MultiarchTriple
|
||||||
|
= TargetTriple.isArch32Bit() ? TargetTriple.get64BitArchVariant()
|
||||||
|
: TargetTriple.get32BitArchVariant();
|
||||||
llvm::Triple::ArchType TargetArch = TargetTriple.getArch();
|
llvm::Triple::ArchType TargetArch = TargetTriple.getArch();
|
||||||
// The library directories which may contain GCC installations.
|
// The library directories which may contain GCC installations.
|
||||||
SmallVector<StringRef, 4> CandidateLibDirs, CandidateMultiarchLibDirs;
|
SmallVector<StringRef, 4> CandidateLibDirs, CandidateMultiarchLibDirs;
|
||||||
|
|
Loading…
Reference in New Issue