@@ -194,7 +194,7 @@ void X86AsmPrinter::emitKCFITypeId(const MachineFunction &MF) {
194194 if (F.getParent ()->getModuleFlag (" kcfi-arity" )) {
195195 // The ArityToRegMap assumes the 64-bit SysV ABI.
196196 [[maybe_unused]] const auto &Triple = MF.getTarget ().getTargetTriple ();
197- assert (Triple.isArch64Bit () && !Triple.isOSWindows ());
197+ assert (Triple.getArch () == Triple::x86_64 && !Triple.isOSWindows ());
198198
199199 // Determine the function's arity (i.e., the number of arguments) at the ABI
200200 // level by counting the number of parameters that are passed
@@ -897,15 +897,16 @@ void X86AsmPrinter::emitStartOfAsmFile(Module &M) {
897897
898898 if (FeatureFlagsAnd) {
899899 // Emit a .note.gnu.property section with the flags.
900- assert ((TT.isArch32Bit () || TT.isArch64Bit () ) &&
900+ assert ((TT.isArch32Bit () || TT.getArch () == Triple::x86_64 ) &&
901901 " CFProtection used on invalid architecture!" );
902902 MCSection *Cur = OutStreamer->getCurrentSectionOnly ();
903903 MCSection *Nt = MMI->getContext ().getELFSection (
904904 " .note.gnu.property" , ELF::SHT_NOTE, ELF::SHF_ALLOC);
905905 OutStreamer->switchSection (Nt);
906906
907907 // Emitting note header.
908- const int WordSize = TT.isArch64Bit () && !TT.isX32 () ? 8 : 4 ;
908+ const int WordSize =
909+ TT.getArch () == Triple::x86_64 && !TT.isX32 () ? 8 : 4 ;
909910 emitAlignment (WordSize == 4 ? Align (4 ) : Align (8 ));
910911 OutStreamer->emitIntValue (4 , 4 /* size*/ ); // data size for "GNU\0"
911912 OutStreamer->emitIntValue (8 + WordSize, 4 /* size*/ ); // Elf_Prop size
0 commit comments