mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-11 06:56:12 +00:00
Use triple predicate functions instead of checking values directly. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220155 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
652627d301
commit
efed41c621
@ -217,31 +217,14 @@ static MCAsmInfo *createARMMCAsmInfo(const MCRegisterInfo &MRI, StringRef TT) {
|
||||
Triple TheTriple(TT);
|
||||
|
||||
MCAsmInfo *MAI;
|
||||
switch (TheTriple.getOS()) {
|
||||
case llvm::Triple::Darwin:
|
||||
case llvm::Triple::IOS:
|
||||
case llvm::Triple::MacOSX:
|
||||
if (TheTriple.isOSDarwin() || TheTriple.isOSBinFormatMachO())
|
||||
MAI = new ARMMCAsmInfoDarwin(TT);
|
||||
break;
|
||||
case llvm::Triple::Win32:
|
||||
switch (TheTriple.getEnvironment()) {
|
||||
case llvm::Triple::Itanium:
|
||||
MAI = new ARMCOFFMCAsmInfoGNU();
|
||||
break;
|
||||
case llvm::Triple::MSVC:
|
||||
MAI = new ARMCOFFMCAsmInfoMicrosoft();
|
||||
break;
|
||||
default:
|
||||
llvm_unreachable("invalid environment");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (TheTriple.isOSBinFormatMachO())
|
||||
MAI = new ARMMCAsmInfoDarwin(TT);
|
||||
else
|
||||
MAI = new ARMELFMCAsmInfo(TT);
|
||||
break;
|
||||
}
|
||||
else if (TheTriple.isWindowsItaniumEnvironment())
|
||||
MAI = new ARMCOFFMCAsmInfoGNU();
|
||||
else if (TheTriple.isWindowsMSVCEnvironment())
|
||||
MAI = new ARMCOFFMCAsmInfoMicrosoft();
|
||||
else
|
||||
MAI = new ARMELFMCAsmInfo(TT);
|
||||
|
||||
unsigned Reg = MRI.getDwarfRegNum(ARM::SP, true);
|
||||
MAI->addInitialFrameState(MCCFIInstruction::createDefCfa(nullptr, Reg, 0));
|
||||
|
Loading…
x
Reference in New Issue
Block a user