From 9f85a3a7378593c70bf948e6f057ae4a288e5ba8 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Mon, 21 Sep 2015 17:41:05 +0000 Subject: [PATCH] SelectionDAG: Use InsertNode for EntryNode This fixes problems where two nodes have persistent debug id 0 assigned. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248182 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index e2e34dbf07a..2aec9050d97 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -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(nullptr)); EntryNode.UseList = nullptr; - AllNodes.push_back(&EntryNode); + InsertNode(&EntryNode); Root = getEntryNode(); DbgInfo->clear(); } -- 2.34.1