Skip to content

Commit e31cfc4

Browse files
committed
Fix -Wconstant-conversion warning with explicit cast
Introduced by fd6584a Following similar use of casts in AsmParser.cpp, for instance - ideally this type would use unsigned chars as they're more representative of raw data and don't get confused around implementation defined choices of char's signedness, but this is what it is & the signed/unsigned conversions are (so far as I understand) safe/bit preserving in this usage and what's intended, given the API design here.
1 parent e4441fc commit e31cfc4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/AArch64/AArch64FrameLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ MCCFIInstruction AArch64FrameLowering::createDefCFAExpressionFromSP(
442442

443443
// Build up the expression (SP + NumBytes + NumVGScaledBytes * AArch64::VG)
444444
SmallString<64> Expr;
445-
Expr.push_back(dwarf::DW_OP_breg0 + /*SP*/ 31);
445+
Expr.push_back((uint8_t)(dwarf::DW_OP_breg0 + /*SP*/ 31));
446446
Expr.push_back(0);
447447
appendVGScaledOffsetExpr(Expr, NumBytes, NumVGScaledBytes,
448448
TRI.getDwarfRegNum(AArch64::VG, true), Comment);

0 commit comments

Comments
 (0)