Skip to content

Commit b6ca36f

Browse files
committed
Merge from mainline.
First initialize DAG otherwise dwarf writer is used uninitialized. Duncan spotted this. Thanks! llvm-svn: 63793
1 parent f9b2580 commit b6ca36f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ unsigned SelectionDAG::getMVTAlignment(MVT VT) const {
787787
}
788788

789789
SelectionDAG::SelectionDAG(TargetLowering &tli, FunctionLoweringInfo &fli)
790-
: TLI(tli), FLI(fli),
790+
: TLI(tli), FLI(fli), DW(0),
791791
EntryNode(ISD::EntryToken, getVTList(MVT::Other)),
792792
Root(getEntryNode()) {
793793
AllNodes.push_back(&EntryNode);

llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,10 +313,10 @@ bool SelectionDAGISel::runOnFunction(Function &Fn) {
313313
RegInfo = &MF->getRegInfo();
314314
DOUT << "\n\n\n=== " << Fn.getName() << "\n";
315315

316-
FuncInfo->set(Fn, *MF, *CurDAG, EnableFastISel);
317316
MachineModuleInfo *MMI = getAnalysisIfAvailable<MachineModuleInfo>();
318317
DwarfWriter *DW = getAnalysisIfAvailable<DwarfWriter>();
319318
CurDAG->init(*MF, MMI, DW);
319+
FuncInfo->set(Fn, *MF, *CurDAG, EnableFastISel);
320320
SDL->init(GFI, *AA);
321321

322322
for (Function::iterator I = Fn.begin(), E = Fn.end(); I != E; ++I)

0 commit comments

Comments
 (0)