Skip to content

Commit bd9a525

Browse files
committed
[AArch64] Fix gcc "enumeral and non-enumeral type" warning
Without this gcc (9.3.0) warns with ../lib/Target/AArch64/GISel/AArch64CallLowering.cpp: In function 'unsigned int getCallOpcode(const llvm::MachineFunction&, bool, bool, std::optional<llvm::CallLowering::PtrAuthInfo>&, llvm::MachineRegisterInfo&)': ../lib/Target/AArch64/GISel/AArch64CallLowering.cpp:1025: warning: enumeral and non-enumeral type in conditional expression [-Wextra] 1025 | return IsIndirect ? getBLRCallOpcode(CallerF) : AArch64::BL; |
1 parent baad1b8 commit bd9a525

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1022,7 +1022,7 @@ static unsigned getCallOpcode(const MachineFunction &CallerF, bool IsIndirect,
10221022

10231023
if (!IsTailCall) {
10241024
if (!PAI)
1025-
return IsIndirect ? getBLRCallOpcode(CallerF) : AArch64::BL;
1025+
return IsIndirect ? getBLRCallOpcode(CallerF) : (unsigned)AArch64::BL;
10261026

10271027
assert(IsIndirect && "Direct call should not be authenticated");
10281028
assert((PAI->Key == AArch64PACKey::IA || PAI->Key == AArch64PACKey::IB) &&

0 commit comments

Comments
 (0)