Skip to content

Commit

Permalink
clarify error produced when -ffixed-x18 is not passed
Browse files Browse the repository at this point in the history
  • Loading branch information
fw-immunant committed Aug 21, 2024
1 parent eea89c4 commit 7505a56
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10463,7 +10463,10 @@ getRegisterByName(const char* RegName, LLT VT, const MachineFunction &MF) const
unsigned DwarfRegNum = MRI->getDwarfRegNum(Reg, false);
if (!Subtarget->isXRegisterReserved(DwarfRegNum) &&
!MRI->isReservedReg(MF, Reg))
Reg = 0;
report_fatal_error(
Twine("Register \"" + StringRef(RegName) +
"\" is not reserved! Did you forget to pass -ffixed-" +
StringRef(RegName) + "?"));
}
if (Reg)
return Reg;
Expand Down

0 comments on commit 7505a56

Please sign in to comment.