@@ -63,8 +63,10 @@ StringRef Triple::getArchTypeName(ArchType Kind) {
6363 case renderscript64: return " renderscript64" ;
6464 case riscv32: return " riscv32" ;
6565 case riscv64: return " riscv64" ;
66- case riscv32be: return " riscv32be" ;
67- case riscv64be: return " riscv64be" ;
66+ case riscv32be:
67+ return " riscv32be" ;
68+ case riscv64be:
69+ return " riscv64be" ;
6870 case shave: return " shave" ;
6971 case sparc: return " sparc" ;
7072 case sparcel: return " sparcel" ;
@@ -431,73 +433,73 @@ static Triple::ArchType parseBPFArch(StringRef ArchName) {
431433Triple::ArchType Triple::getArchTypeForLLVMName (StringRef Name) {
432434 Triple::ArchType BPFArch (parseBPFArch (Name));
433435 return StringSwitch<Triple::ArchType>(Name)
434- .Case (" aarch64" , aarch64)
435- .Case (" aarch64_be" , aarch64_be)
436- .Case (" aarch64_32" , aarch64_32)
437- .Case (" arc" , arc)
438- .Case (" arm64" , aarch64) // "arm64" is an alias for "aarch64"
439- .Case (" arm64_32" , aarch64_32)
440- .Case (" arm" , arm)
441- .Case (" armeb" , armeb)
442- .Case (" avr" , avr)
443- .StartsWith (" bpf" , BPFArch)
444- .Case (" m68k" , m68k)
445- .Case (" mips" , mips)
446- .Case (" mipsel" , mipsel)
447- .Case (" mips64" , mips64)
448- .Case (" mips64el" , mips64el)
449- .Case (" msp430" , msp430)
450- .Case (" ppc64" , ppc64)
451- .Case (" ppc32" , ppc)
452- .Case (" ppc" , ppc)
453- .Case (" ppc32le" , ppcle)
454- .Case (" ppcle" , ppcle)
455- .Case (" ppc64le" , ppc64le)
456- .Case (" r600" , r600)
457- .Case (" amdgcn" , amdgcn)
458- .Case (" riscv32" , riscv32)
459- .Case (" riscv64" , riscv64)
460- .Case (" riscv32be" , riscv32be)
461- .Case (" riscv64be" , riscv64be)
462- .Case (" hexagon" , hexagon)
463- .Case (" sparc" , sparc)
464- .Case (" sparcel" , sparcel)
465- .Case (" sparcv9" , sparcv9)
466- .Case (" s390x" , systemz)
467- .Case (" systemz" , systemz)
468- .Case (" tce" , tce)
469- .Case (" tcele" , tcele)
470- .Case (" thumb" , thumb)
471- .Case (" thumbeb" , thumbeb)
472- .Case (" x86" , x86)
473- .Case (" i386" , x86)
474- .Case (" x86-64" , x86_64)
475- .Case (" xcore" , xcore)
476- .Case (" nvptx" , nvptx)
477- .Case (" nvptx64" , nvptx64)
478- .Case (" amdil" , amdil)
479- .Case (" amdil64" , amdil64)
480- .Case (" hsail" , hsail)
481- .Case (" hsail64" , hsail64)
482- .Case (" spir" , spir)
483- .Case (" spir64" , spir64)
484- .Case (" spirv" , spirv)
485- .Case (" spirv32" , spirv32)
486- .Case (" spirv64" , spirv64)
487- .Case (" kalimba" , kalimba)
488- .Case (" lanai" , lanai)
489- .Case (" shave" , shave)
490- .Case (" wasm32" , wasm32)
491- .Case (" wasm64" , wasm64)
492- .Case (" renderscript32" , renderscript32)
493- .Case (" renderscript64" , renderscript64)
494- .Case (" ve" , ve)
495- .Case (" csky" , csky)
496- .Case (" loongarch32" , loongarch32)
497- .Case (" loongarch64" , loongarch64)
498- .Case (" dxil" , dxil)
499- .Case (" xtensa" , xtensa)
500- .Default (UnknownArch);
436+ .Case (" aarch64" , aarch64)
437+ .Case (" aarch64_be" , aarch64_be)
438+ .Case (" aarch64_32" , aarch64_32)
439+ .Case (" arc" , arc)
440+ .Case (" arm64" , aarch64) // "arm64" is an alias for "aarch64"
441+ .Case (" arm64_32" , aarch64_32)
442+ .Case (" arm" , arm)
443+ .Case (" armeb" , armeb)
444+ .Case (" avr" , avr)
445+ .StartsWith (" bpf" , BPFArch)
446+ .Case (" m68k" , m68k)
447+ .Case (" mips" , mips)
448+ .Case (" mipsel" , mipsel)
449+ .Case (" mips64" , mips64)
450+ .Case (" mips64el" , mips64el)
451+ .Case (" msp430" , msp430)
452+ .Case (" ppc64" , ppc64)
453+ .Case (" ppc32" , ppc)
454+ .Case (" ppc" , ppc)
455+ .Case (" ppc32le" , ppcle)
456+ .Case (" ppcle" , ppcle)
457+ .Case (" ppc64le" , ppc64le)
458+ .Case (" r600" , r600)
459+ .Case (" amdgcn" , amdgcn)
460+ .Case (" riscv32" , riscv32)
461+ .Case (" riscv64" , riscv64)
462+ .Case (" riscv32be" , riscv32be)
463+ .Case (" riscv64be" , riscv64be)
464+ .Case (" hexagon" , hexagon)
465+ .Case (" sparc" , sparc)
466+ .Case (" sparcel" , sparcel)
467+ .Case (" sparcv9" , sparcv9)
468+ .Case (" s390x" , systemz)
469+ .Case (" systemz" , systemz)
470+ .Case (" tce" , tce)
471+ .Case (" tcele" , tcele)
472+ .Case (" thumb" , thumb)
473+ .Case (" thumbeb" , thumbeb)
474+ .Case (" x86" , x86)
475+ .Case (" i386" , x86)
476+ .Case (" x86-64" , x86_64)
477+ .Case (" xcore" , xcore)
478+ .Case (" nvptx" , nvptx)
479+ .Case (" nvptx64" , nvptx64)
480+ .Case (" amdil" , amdil)
481+ .Case (" amdil64" , amdil64)
482+ .Case (" hsail" , hsail)
483+ .Case (" hsail64" , hsail64)
484+ .Case (" spir" , spir)
485+ .Case (" spir64" , spir64)
486+ .Case (" spirv" , spirv)
487+ .Case (" spirv32" , spirv32)
488+ .Case (" spirv64" , spirv64)
489+ .Case (" kalimba" , kalimba)
490+ .Case (" lanai" , lanai)
491+ .Case (" shave" , shave)
492+ .Case (" wasm32" , wasm32)
493+ .Case (" wasm64" , wasm64)
494+ .Case (" renderscript32" , renderscript32)
495+ .Case (" renderscript64" , renderscript64)
496+ .Case (" ve" , ve)
497+ .Case (" csky" , csky)
498+ .Case (" loongarch32" , loongarch32)
499+ .Case (" loongarch64" , loongarch64)
500+ .Case (" dxil" , dxil)
501+ .Case (" xtensa" , xtensa)
502+ .Default (UnknownArch);
501503}
502504
503505static Triple::ArchType parseARMArch (StringRef ArchName) {
@@ -566,86 +568,85 @@ static Triple::ArchType parseARMArch(StringRef ArchName) {
566568}
567569
568570static Triple::ArchType parseArch (StringRef ArchName) {
569- auto AT =
570- StringSwitch<Triple::ArchType>(ArchName)
571- .Cases (" i386" , " i486" , " i586" , " i686" , Triple::x86)
572- // FIXME: Do we need to support these?
573- .Cases (" i786" , " i886" , " i986" , Triple::x86)
574- .Cases (" amd64" , " x86_64" , " x86_64h" , Triple::x86_64)
575- .Cases (" powerpc" , " powerpcspe" , " ppc" , " ppc32" , Triple::ppc)
576- .Cases (" powerpcle" , " ppcle" , " ppc32le" , Triple::ppcle)
577- .Cases (" powerpc64" , " ppu" , " ppc64" , Triple::ppc64)
578- .Cases (" powerpc64le" , " ppc64le" , Triple::ppc64le)
579- .Case (" xscale" , Triple::arm)
580- .Case (" xscaleeb" , Triple::armeb)
581- .Case (" aarch64" , Triple::aarch64)
582- .Case (" aarch64_be" , Triple::aarch64_be)
583- .Case (" aarch64_32" , Triple::aarch64_32)
584- .Case (" arc" , Triple::arc)
585- .Case (" arm64" , Triple::aarch64)
586- .Case (" arm64_32" , Triple::aarch64_32)
587- .Case (" arm64e" , Triple::aarch64)
588- .Case (" arm64ec" , Triple::aarch64)
589- .Case (" arm" , Triple::arm)
590- .Case (" armeb" , Triple::armeb)
591- .Case (" thumb" , Triple::thumb)
592- .Case (" thumbeb" , Triple::thumbeb)
593- .Case (" avr" , Triple::avr)
594- .Case (" m68k" , Triple::m68k)
595- .Case (" msp430" , Triple::msp430)
596- .Cases (" mips" , " mipseb" , " mipsallegrex" , " mipsisa32r6" , " mipsr6" ,
597- Triple::mips)
598- .Cases (" mipsel" , " mipsallegrexel" , " mipsisa32r6el" , " mipsr6el" ,
599- Triple::mipsel)
600- .Cases (" mips64" , " mips64eb" , " mipsn32" , " mipsisa64r6" , " mips64r6" ,
601- " mipsn32r6" , Triple::mips64)
602- .Cases (" mips64el" , " mipsn32el" , " mipsisa64r6el" , " mips64r6el" ,
603- " mipsn32r6el" , Triple::mips64el)
604- .Case (" r600" , Triple::r600)
605- .Case (" amdgcn" , Triple::amdgcn)
606- .Case (" riscv32" , Triple::riscv32)
607- .Case (" riscv64" , Triple::riscv64)
608- .Case (" riscv32be" , Triple::riscv32be)
609- .Case (" riscv64be" , Triple::riscv64be)
610- .Case (" hexagon" , Triple::hexagon)
611- .Cases (" s390x" , " systemz" , Triple::systemz)
612- .Case (" sparc" , Triple::sparc)
613- .Case (" sparcel" , Triple::sparcel)
614- .Cases (" sparcv9" , " sparc64" , Triple::sparcv9)
615- .Case (" tce" , Triple::tce)
616- .Case (" tcele" , Triple::tcele)
617- .Case (" xcore" , Triple::xcore)
618- .Case (" nvptx" , Triple::nvptx)
619- .Case (" nvptx64" , Triple::nvptx64)
620- .Case (" amdil" , Triple::amdil)
621- .Case (" amdil64" , Triple::amdil64)
622- .Case (" hsail" , Triple::hsail)
623- .Case (" hsail64" , Triple::hsail64)
624- .Case (" spir" , Triple::spir)
625- .Case (" spir64" , Triple::spir64)
626- .Cases (" spirv" , " spirv1.5" , " spirv1.6" , Triple::spirv)
627- .Cases (" spirv32" , " spirv32v1.0" , " spirv32v1.1" , " spirv32v1.2" ,
628- " spirv32v1.3" , " spirv32v1.4" , " spirv32v1.5" ,
629- " spirv32v1.6" , Triple::spirv32)
630- .Cases (" spirv64" , " spirv64v1.0" , " spirv64v1.1" , " spirv64v1.2" ,
631- " spirv64v1.3" , " spirv64v1.4" , " spirv64v1.5" ,
632- " spirv64v1.6" , Triple::spirv64)
633- .StartsWith (" kalimba" , Triple::kalimba)
634- .Case (" lanai" , Triple::lanai)
635- .Case (" renderscript32" , Triple::renderscript32)
636- .Case (" renderscript64" , Triple::renderscript64)
637- .Case (" shave" , Triple::shave)
638- .Case (" ve" , Triple::ve)
639- .Case (" wasm32" , Triple::wasm32)
640- .Case (" wasm64" , Triple::wasm64)
641- .Case (" csky" , Triple::csky)
642- .Case (" loongarch32" , Triple::loongarch32)
643- .Case (" loongarch64" , Triple::loongarch64)
644- .Cases (" dxil" , " dxilv1.0" , " dxilv1.1" , " dxilv1.2" , " dxilv1.3" ,
645- " dxilv1.4" , " dxilv1.5" , " dxilv1.6" , " dxilv1.7" , " dxilv1.8" ,
646- Triple::dxil)
647- .Case (" xtensa" , Triple::xtensa)
648- .Default (Triple::UnknownArch);
571+ auto AT = StringSwitch<Triple::ArchType>(ArchName)
572+ .Cases (" i386" , " i486" , " i586" , " i686" , Triple::x86)
573+ // FIXME: Do we need to support these?
574+ .Cases (" i786" , " i886" , " i986" , Triple::x86)
575+ .Cases (" amd64" , " x86_64" , " x86_64h" , Triple::x86_64)
576+ .Cases (" powerpc" , " powerpcspe" , " ppc" , " ppc32" , Triple::ppc)
577+ .Cases (" powerpcle" , " ppcle" , " ppc32le" , Triple::ppcle)
578+ .Cases (" powerpc64" , " ppu" , " ppc64" , Triple::ppc64)
579+ .Cases (" powerpc64le" , " ppc64le" , Triple::ppc64le)
580+ .Case (" xscale" , Triple::arm)
581+ .Case (" xscaleeb" , Triple::armeb)
582+ .Case (" aarch64" , Triple::aarch64)
583+ .Case (" aarch64_be" , Triple::aarch64_be)
584+ .Case (" aarch64_32" , Triple::aarch64_32)
585+ .Case (" arc" , Triple::arc)
586+ .Case (" arm64" , Triple::aarch64)
587+ .Case (" arm64_32" , Triple::aarch64_32)
588+ .Case (" arm64e" , Triple::aarch64)
589+ .Case (" arm64ec" , Triple::aarch64)
590+ .Case (" arm" , Triple::arm)
591+ .Case (" armeb" , Triple::armeb)
592+ .Case (" thumb" , Triple::thumb)
593+ .Case (" thumbeb" , Triple::thumbeb)
594+ .Case (" avr" , Triple::avr)
595+ .Case (" m68k" , Triple::m68k)
596+ .Case (" msp430" , Triple::msp430)
597+ .Cases (" mips" , " mipseb" , " mipsallegrex" , " mipsisa32r6" ,
598+ " mipsr6" , Triple::mips)
599+ .Cases (" mipsel" , " mipsallegrexel" , " mipsisa32r6el" , " mipsr6el" ,
600+ Triple::mipsel)
601+ .Cases (" mips64" , " mips64eb" , " mipsn32" , " mipsisa64r6" ,
602+ " mips64r6" , " mipsn32r6" , Triple::mips64)
603+ .Cases (" mips64el" , " mipsn32el" , " mipsisa64r6el" , " mips64r6el" ,
604+ " mipsn32r6el" , Triple::mips64el)
605+ .Case (" r600" , Triple::r600)
606+ .Case (" amdgcn" , Triple::amdgcn)
607+ .Case (" riscv32" , Triple::riscv32)
608+ .Case (" riscv64" , Triple::riscv64)
609+ .Case (" riscv32be" , Triple::riscv32be)
610+ .Case (" riscv64be" , Triple::riscv64be)
611+ .Case (" hexagon" , Triple::hexagon)
612+ .Cases (" s390x" , " systemz" , Triple::systemz)
613+ .Case (" sparc" , Triple::sparc)
614+ .Case (" sparcel" , Triple::sparcel)
615+ .Cases (" sparcv9" , " sparc64" , Triple::sparcv9)
616+ .Case (" tce" , Triple::tce)
617+ .Case (" tcele" , Triple::tcele)
618+ .Case (" xcore" , Triple::xcore)
619+ .Case (" nvptx" , Triple::nvptx)
620+ .Case (" nvptx64" , Triple::nvptx64)
621+ .Case (" amdil" , Triple::amdil)
622+ .Case (" amdil64" , Triple::amdil64)
623+ .Case (" hsail" , Triple::hsail)
624+ .Case (" hsail64" , Triple::hsail64)
625+ .Case (" spir" , Triple::spir)
626+ .Case (" spir64" , Triple::spir64)
627+ .Cases (" spirv" , " spirv1.5" , " spirv1.6" , Triple::spirv)
628+ .Cases (" spirv32" , " spirv32v1.0" , " spirv32v1.1" , " spirv32v1.2" ,
629+ " spirv32v1.3" , " spirv32v1.4" , " spirv32v1.5" ,
630+ " spirv32v1.6" , Triple::spirv32)
631+ .Cases (" spirv64" , " spirv64v1.0" , " spirv64v1.1" , " spirv64v1.2" ,
632+ " spirv64v1.3" , " spirv64v1.4" , " spirv64v1.5" ,
633+ " spirv64v1.6" , Triple::spirv64)
634+ .StartsWith (" kalimba" , Triple::kalimba)
635+ .Case (" lanai" , Triple::lanai)
636+ .Case (" renderscript32" , Triple::renderscript32)
637+ .Case (" renderscript64" , Triple::renderscript64)
638+ .Case (" shave" , Triple::shave)
639+ .Case (" ve" , Triple::ve)
640+ .Case (" wasm32" , Triple::wasm32)
641+ .Case (" wasm64" , Triple::wasm64)
642+ .Case (" csky" , Triple::csky)
643+ .Case (" loongarch32" , Triple::loongarch32)
644+ .Case (" loongarch64" , Triple::loongarch64)
645+ .Cases (" dxil" , " dxilv1.0" , " dxilv1.1" , " dxilv1.2" , " dxilv1.3" ,
646+ " dxilv1.4" , " dxilv1.5" , " dxilv1.6" , " dxilv1.7" ,
647+ " dxilv1.8" , Triple::dxil)
648+ .Case (" xtensa" , Triple::xtensa)
649+ .Default (Triple::UnknownArch);
649650
650651 // Some architectures require special parsing logic just to compute the
651652 // ArchType result.
0 commit comments