mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 09:14:42 +01:00
Silence GCC 7 warning
GCC 7 was reporting "enumeral and non-enumeral type in conditional expression" as a warning. The code casts an instruction opcode enum to unsigned implicitly, in line with intentions; so this commit silences the warning by making the cast to unsigned explicit.
This commit is contained in:
@@ -3270,7 +3270,8 @@ bool AArch64FastISel::fastLowerCall(CallLoweringInfo &CLI) {
|
||||
// Issue the call.
|
||||
MachineInstrBuilder MIB;
|
||||
if (Subtarget->useSmallAddressing()) {
|
||||
const MCInstrDesc &II = TII.get(Addr.getReg() ? getBLRCallOpcode(*MF) : AArch64::BL);
|
||||
const MCInstrDesc &II =
|
||||
TII.get(Addr.getReg() ? getBLRCallOpcode(*MF) : (unsigned)AArch64::BL);
|
||||
MIB = BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DbgLoc, II);
|
||||
if (Symbol)
|
||||
MIB.addSym(Symbol, 0);
|
||||
|
||||
@@ -776,7 +776,7 @@ bool AArch64CallLowering::isEligibleForTailCallOptimization(
|
||||
static unsigned getCallOpcode(const MachineFunction &CallerF, bool IsIndirect,
|
||||
bool IsTailCall) {
|
||||
if (!IsTailCall)
|
||||
return IsIndirect ? getBLRCallOpcode(CallerF) : AArch64::BL;
|
||||
return IsIndirect ? getBLRCallOpcode(CallerF) : (unsigned)AArch64::BL;
|
||||
|
||||
if (!IsIndirect)
|
||||
return AArch64::TCRETURNdi;
|
||||
|
||||
Reference in New Issue
Block a user