Skip to content

Commit 8dd0da5

Browse files
committed
[AArch64] Silence warning with different types in ternary. NFC
This just casts the Register to an unsigned, to fit in with the other types returned from the function.
1 parent b68340c commit 8dd0da5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3025,7 +3025,7 @@ unsigned AArch64AsmParser::matchRegisterNameAlias(StringRef Name,
30253025
return Kind == RegKind::Matrix ? RegNum : 0;
30263026

30273027
if (Name.equals_insensitive("zt0"))
3028-
return Kind == RegKind::LookupTable ? AArch64::ZT0 : 0;
3028+
return Kind == RegKind::LookupTable ? unsigned(AArch64::ZT0) : 0;
30293029

30303030
// The parsed register must be of RegKind Scalar
30313031
if ((RegNum = MatchRegisterName(Name)))

0 commit comments

Comments
 (0)