SelectionDAG: Use InsertNode for EntryNode

This fixes problems where two nodes have persistent debug id 0 assigned.

llvm-svn: 248182
This commit is contained in:
Matthias Braun 2015-09-21 17:41:05 +00:00
parent 7542d37688
commit b9fe44ddb0
1 changed files with 2 additions and 2 deletions

View File

@ -927,7 +927,7 @@ SelectionDAG::SelectionDAG(const TargetMachine &tm, CodeGenOpt::Level OL)
EntryNode(ISD::EntryToken, 0, DebugLoc(), getVTList(MVT::Other)),
Root(getEntryNode()), NewNodesMustHaveLegalTypes(false),
UpdateListeners(nullptr) {
AllNodes.push_back(&EntryNode);
InsertNode(&EntryNode);
DbgInfo = new SDDbgInfo();
}
@ -1024,7 +1024,7 @@ void SelectionDAG::clear() {
static_cast<SDNode*>(nullptr));
EntryNode.UseList = nullptr;
AllNodes.push_back(&EntryNode);
InsertNode(&EntryNode);
Root = getEntryNode();
DbgInfo->clear();
}