Skip to content

Commit ae2283c

Browse files
committed
static_cast
1 parent 6065904 commit ae2283c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2820,7 +2820,7 @@ void AsmPrinter::emitJumpTableSizesSection(const MachineJumpTableInfo *MJTI,
28202820

28212821
if (isElf) {
28222822
MCSymbolELF *LinkedToSym = dyn_cast<MCSymbolELF>(CurrentFnSym);
2823-
int Flags = F.hasComdat() ? (int)ELF::SHF_GROUP : 0;
2823+
int Flags = F.hasComdat() ? static_cast<int>(ELF::SHF_GROUP) : 0;
28242824

28252825
JumpTableSizesSection = OutContext.getELFSection(
28262826
sectionName, ELF::SHT_LLVM_JT_SIZES, Flags, 0, GroupName, F.hasComdat(),

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29899,7 +29899,8 @@ static SDValue LowerShift(SDValue Op, const X86Subtarget &Subtarget,
2989929899
// Create our new vector of shift amounts.
2990029900
SDValue Amt16 = getConstVector(AmtBits16, UndefElts16, VT16, DAG, dl);
2990129901
// Perform the actual shift.
29902-
unsigned LogicalOpc = Opc == ISD::SRA ? ISD::SRL : Opc;
29902+
unsigned LogicalOpc =
29903+
Opc == ISD::SRA ? static_cast<unsigned>(ISD::SRL) : Opc;
2990329904
SDValue ShiftedR = DAG.getNode(LogicalOpc, dl, VT16, R16, Amt16);
2990429905
// Now we need to construct a mask which will "drop" bits that get
2990529906
// shifted past the LSB/MSB. For a logical shift left, it will look

0 commit comments

Comments
 (0)