Fix null reference creation in ScheduleDAGInstrs constructor call.
Both MachineLoopInfo and MachineDominatorTree may be null in ScheduleDAGMI constructor call. It is undefined behavior to take references to these values. This bug is reported by UBSan. llvm-svn: 216118
This commit is contained in:
@@ -115,7 +115,7 @@ public:
|
||||
DefaultVLIWScheduler::DefaultVLIWScheduler(
|
||||
MachineFunction &MF, MachineLoopInfo &MLI, MachineDominatorTree &MDT,
|
||||
bool IsPostRA) :
|
||||
ScheduleDAGInstrs(MF, MLI, MDT, IsPostRA) {
|
||||
ScheduleDAGInstrs(MF, &MLI, &MDT, IsPostRA) {
|
||||
CanHandleTerminators = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user