Skip to content

Commit

Permalink
[AArch64] Fix gcc "enumeral and non-enumeral type" warning
Browse files Browse the repository at this point in the history
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;
       |
  • Loading branch information
mikaelholmen committed Jun 11, 2024
1 parent baad1b8 commit bd9a525
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,7 @@ static unsigned getCallOpcode(const MachineFunction &CallerF, bool IsIndirect,

if (!IsTailCall) {
if (!PAI)
return IsIndirect ? getBLRCallOpcode(CallerF) : AArch64::BL;
return IsIndirect ? getBLRCallOpcode(CallerF) : (unsigned)AArch64::BL;

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

0 comments on commit bd9a525

Please sign in to comment.