From 79acb69a6fc509b77d0e915fcd0e2fe772dcfcf9 Mon Sep 17 00:00:00 2001 From: Andrew Lenharth Date: Mon, 27 Mar 2006 23:39:58 +0000 Subject: [PATCH] If adding a link to a collapsed, node, ignore offset. Fixes 2006-03-27-LinkedCollapsed.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27194 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/DataStructure/DataStructure.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp index 7fabdf21238..565a596b7cd 100644 --- a/lib/Analysis/DataStructure/DataStructure.cpp +++ b/lib/Analysis/DataStructure/DataStructure.cpp @@ -701,6 +701,9 @@ bool DSNode::mergeTypeInfo(const Type *NewTy, unsigned Offset, void DSNode::addEdgeTo(unsigned Offset, const DSNodeHandle &NH) { if (NH.isNull()) return; // Nothing to do + if (isNodeCompletelyFolded()) + Offset = 0; + DSNodeHandle &ExistingEdge = getLink(Offset); if (!ExistingEdge.isNull()) { // Merge the two nodes...