forked from OSchip/llvm-project
Use switch statements in preparation for adding more architectures.
llvm-svn: 199529
This commit is contained in:
parent
48b842ef7c
commit
d769a1ed62
|
@ -2262,8 +2262,13 @@ NetBSD::GetCXXStdlibType(const ArgList &Args) const {
|
||||||
unsigned Major, Minor, Micro;
|
unsigned Major, Minor, Micro;
|
||||||
getTriple().getOSVersion(Major, Minor, Micro);
|
getTriple().getOSVersion(Major, Minor, Micro);
|
||||||
if (Major >= 7 || (Major == 6 && Minor == 99 && Micro >= 23) || Major == 0) {
|
if (Major >= 7 || (Major == 6 && Minor == 99 && Micro >= 23) || Major == 0) {
|
||||||
if (getArch() == llvm::Triple::x86 || getArch() == llvm::Triple::x86_64)
|
switch (getArch()) {
|
||||||
|
case llvm::Triple::x86:
|
||||||
|
case llvm::Triple::x86_64:
|
||||||
return ToolChain::CST_Libcxx;
|
return ToolChain::CST_Libcxx;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return ToolChain::CST_Libstdcxx;
|
return ToolChain::CST_Libstdcxx;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6101,9 +6101,14 @@ void netbsd::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
getToolChain().getTriple().getOSVersion(Major, Minor, Micro);
|
getToolChain().getTriple().getOSVersion(Major, Minor, Micro);
|
||||||
bool useLibgcc = true;
|
bool useLibgcc = true;
|
||||||
if (Major >= 7 || (Major == 6 && Minor == 99 && Micro >= 23) || Major == 0) {
|
if (Major >= 7 || (Major == 6 && Minor == 99 && Micro >= 23) || Major == 0) {
|
||||||
if (getToolChain().getArch() == llvm::Triple::x86 ||
|
switch(getToolChain().getArch()) {
|
||||||
getToolChain().getArch() == llvm::Triple::x86_64)
|
case llvm::Triple::x86:
|
||||||
|
case llvm::Triple::x86_64:
|
||||||
useLibgcc = false;
|
useLibgcc = false;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Args.hasArg(options::OPT_nostdlib) &&
|
if (!Args.hasArg(options::OPT_nostdlib) &&
|
||||||
|
|
Loading…
Reference in New Issue