[all-commits] [llvm/llvm-project] 90c326: [AArch64] Fix gcc warning about mix of enumeral an...
mikaelholmen via All-commits
all-commits at lists.llvm.org
Wed Jan 24 23:00:30 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 90c326b198080c5c208f62f6755d54d7b69b291d
https://github.com/llvm/llvm-project/commit/90c326b198080c5c208f62f6755d54d7b69b291d
Author: Mikael Holmen <mikael.holmen at ericsson.com>
Date: 2024-01-25 (Thu, 25 Jan 2024)
Changed paths:
M llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
Log Message:
-----------
[AArch64] Fix gcc warning about mix of enumeral and non-enumeral types [NFC]
Change the return type of
findScratchNonCalleeSaveRegister
to Register instead of unsigned.
Every place the function is called we already put the returned value in a
Register variable or compare it with another Register.
This fixes some gcc warnings:
../lib/Target/AArch64/AArch64FrameLowering.cpp:744: warning: enumeral and non-enumeral type in conditional expression [-Wextra]
743 | Register TargetReg = RealignmentPadding
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
744 | ? findScratchNonCalleeSaveRegister(&MBB)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
745 | : AArch64::SP;
|
../lib/Target/AArch64/AArch64FrameLowering.cpp:803: warning: enumeral and non-enumeral type in conditional expression [-Wextra]
802 | Register ScratchReg = RealignmentPadding
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
803 | ? findScratchNonCalleeSaveRegister(&MBB)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
804 | : AArch64::SP;
|
More information about the All-commits
mailing list