mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-17 05:13:14 +01:00
if chain -> switch.
This commit is contained in:
@@ -113,17 +113,18 @@ static std::string getTargetCPU(const std::string &cpu,
|
||||
return hostCPU;
|
||||
}
|
||||
|
||||
if (triple.getArch() == llvm::Triple::x86_64 ||
|
||||
triple.getArch() == llvm::Triple::x86)
|
||||
switch (triple.getArch())
|
||||
{
|
||||
default:
|
||||
// We don't know about the specifics of this platform, just return the
|
||||
// empty string and let LLVM decide.
|
||||
return cpu;
|
||||
case llvm::Triple::x86:
|
||||
case llvm::Triple::x86_64:
|
||||
return getX86TargetCPU(triple);
|
||||
}
|
||||
else if (triple.getArch() == llvm::Triple::arm)
|
||||
{
|
||||
case llvm::Triple::arm:
|
||||
return getARMTargetCPU(triple);
|
||||
}
|
||||
|
||||
return cpu;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user