Skip to content

Commit 145ddf7

Browse files
committed
[M68k] Fix build after splitting SDNode::use_iterator.
1 parent fafdf97 commit 145ddf7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Target/M68k/M68kISelLowering.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1848,12 +1848,12 @@ static SDValue LowerTruncateToBTST(SDValue Op, ISD::CondCode CC,
18481848
static bool hasNonFlagsUse(SDValue Op) {
18491849
for (SDNode::use_iterator UI = Op->use_begin(), UE = Op->use_end(); UI != UE;
18501850
++UI) {
1851-
SDNode *User = *UI;
1851+
SDNode *User = UI->getUser();
18521852
unsigned UOpNo = UI.getOperandNo();
18531853
if (User->getOpcode() == ISD::TRUNCATE && User->hasOneUse()) {
18541854
// Look pass truncate.
18551855
UOpNo = User->use_begin().getOperandNo();
1856-
User = *User->use_begin();
1856+
User = User->use_begin()->getUser();
18571857
}
18581858

18591859
if (User->getOpcode() != ISD::BRCOND && User->getOpcode() != ISD::SETCC &&
@@ -2542,7 +2542,7 @@ SDValue M68kTargetLowering::LowerBRCOND(SDValue Op, SelectionDAG &DAG) const {
25422542
(M68k::CondCode)Cond.getOperand(0).getConstantOperandVal(0);
25432543
CCode = M68k::GetOppositeBranchCondition(CCode);
25442544
CC = DAG.getConstant(CCode, DL, MVT::i8);
2545-
SDNode *User = *Op.getNode()->use_begin();
2545+
SDNode *User = *Op.getNode()->user_begin();
25462546
// Look for an unconditional branch following this conditional branch.
25472547
// We need this because we need to reverse the successors in order
25482548
// to implement FCMP_OEQ.

0 commit comments

Comments
 (0)