Initialize SelectionDAGBuilder's Context in 'init', not in its constructor. The

SelectionDAG's 'init' has not been called when the SelectionDAGBuilder is
constructed (in SelectionDAGISel's constructor), so this was previously always
initialized with 0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162333 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Richard Smith 2012-08-22 00:42:39 +00:00
parent bc36393108
commit cb1f68d7c8
2 changed files with 2 additions and 1 deletions

View File

@ -825,6 +825,7 @@ void SelectionDAGBuilder::init(GCFunctionInfo *gfi, AliasAnalysis &aa,
GFI = gfi;
LibInfo = li;
TD = DAG.getTarget().getTargetData();
Context = DAG.getContext();
LPadToCallSiteMap.clear();
}

View File

@ -325,7 +325,7 @@ public:
CodeGenOpt::Level ol)
: SDNodeOrder(0), TM(dag.getTarget()), TLI(dag.getTargetLoweringInfo()),
DAG(dag), FuncInfo(funcinfo), OptLevel(ol),
HasTailCall(false), Context(dag.getContext()) {
HasTailCall(false) {
}
void init(GCFunctionInfo *gfi, AliasAnalysis &aa,