Fix a really nasty bug with the -disable-ds-field-sensitivity option

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13681 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-05-23 21:14:09 +00:00
parent 1bf3408f96
commit 2412a05b80

View File

@ -130,6 +130,9 @@ namespace {
DSNode *createNode(const Type *Ty = 0) {
DSNode *N = new DSNode(Ty, &G); // Create the node
if (DisableFieldSensitivity) {
// Create node handle referring to the old node so that it is
// immediately removed from the graph when the node handle is destroyed.
DSNodeHandle OldNNH = N;
N->foldNodeCompletely();
if (DSNode *FN = N->getForwardNode())
N = FN;