mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
Add missing null check reported by Amaury Pouly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110649 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -59,8 +59,9 @@ SUnit *ScheduleDAGSDNodes::NewSUnit(SDNode *N) {
|
|||||||
SUnits.back().OrigNode = &SUnits.back();
|
SUnits.back().OrigNode = &SUnits.back();
|
||||||
SUnit *SU = &SUnits.back();
|
SUnit *SU = &SUnits.back();
|
||||||
const TargetLowering &TLI = DAG->getTargetLoweringInfo();
|
const TargetLowering &TLI = DAG->getTargetLoweringInfo();
|
||||||
if (N->isMachineOpcode() &&
|
if (!N ||
|
||||||
N->getMachineOpcode() == TargetOpcode::IMPLICIT_DEF)
|
(N->isMachineOpcode() &&
|
||||||
|
N->getMachineOpcode() == TargetOpcode::IMPLICIT_DEF))
|
||||||
SU->SchedulingPref = Sched::None;
|
SU->SchedulingPref = Sched::None;
|
||||||
else
|
else
|
||||||
SU->SchedulingPref = TLI.getSchedulingPreference(N);
|
SU->SchedulingPref = TLI.getSchedulingPreference(N);
|
||||||
|
Reference in New Issue
Block a user