From: Owen Anderson Date: Thu, 9 Jul 2009 18:44:09 +0000 (+0000) Subject: As Chris pointed out, we don't actually need to pass the context around here. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5dcaceb0a6a7fcf508d9898547e10d374b0e4cd1;p=oota-llvm.git As Chris pointed out, we don't actually need to pass the context around here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75161 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/CodeGen/SelectionDAG.h b/include/llvm/CodeGen/SelectionDAG.h index f90a4609ced..dc93f12df12 100644 --- a/include/llvm/CodeGen/SelectionDAG.h +++ b/include/llvm/CodeGen/SelectionDAG.h @@ -126,8 +126,7 @@ public: /// init - Prepare this SelectionDAG to process code in the given /// MachineFunction. /// - void init(MachineFunction &mf, MachineModuleInfo *mmi, DwarfWriter *dw, - LLVMContext* C); + void init(MachineFunction &mf, MachineModuleInfo *mmi, DwarfWriter *dw); /// clear - Clear state and free memory necessary to make this /// SelectionDAG ready to process a new block. diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 260996fac7a..2d154942c75 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -811,11 +811,11 @@ SelectionDAG::SelectionDAG(TargetLowering &tli, FunctionLoweringInfo &fli) } void SelectionDAG::init(MachineFunction &mf, MachineModuleInfo *mmi, - DwarfWriter *dw, LLVMContext* C) { + DwarfWriter *dw) { MF = &mf; MMI = mmi; DW = dw; - Context = C; + Context = mf.getFunction()->getContext(); } SelectionDAG::~SelectionDAG() { diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index d815523d825..485545c63a5 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -319,7 +319,7 @@ bool SelectionDAGISel::runOnFunction(Function &Fn) { MachineModuleInfo *MMI = getAnalysisIfAvailable(); DwarfWriter *DW = getAnalysisIfAvailable(); - CurDAG->init(*MF, MMI, DW, Context); + CurDAG->init(*MF, MMI, DW); FuncInfo->set(Fn, *MF, *CurDAG, EnableFastISel); SDL->init(GFI, *AA);