Skip to content

Commit 7e51e85

Browse files
committed
Address code review comments; use static_cast instead of C style casts.
1 parent 57f9ef9 commit 7e51e85

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/IR/DIExpressionOptimizer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ foldOperationIfPossible(uint64_t Const1, uint64_t Const2,
6060
}
6161
case dwarf::DW_OP_shl: {
6262
if (Const2 >= std::numeric_limits<uint64_t>::digits ||
63-
(uint64_t)countl_zero(Const1) < Const2)
63+
static_cast<uint64_t>(countl_zero(Const1)) < Const2)
6464
return std::nullopt;
6565
return Const1 << Const2;
6666
}
6767
case dwarf::DW_OP_shr: {
6868
if (Const2 >= std::numeric_limits<uint64_t>::digits ||
69-
(uint64_t)countr_zero(Const1) < Const2)
69+
static_cast<uint64_t>(countr_zero(Const1)) < Const2)
7070
return std::nullopt;
7171
return Const1 >> Const2;
7272
}

0 commit comments

Comments
 (0)