[llvm-commits] [poolalloc] r159604 - /poolalloc/trunk/lib/AssistDS/DSNodeEquivs.cpp
Matthew Wala
mttjwl at gmail.com
Mon Jul 2 15:05:41 PDT 2012
Author: wala1
Date: Mon Jul 2 17:05:41 2012
New Revision: 159604
URL: http://llvm.org/viewvc/llvm-project?rev=159604&view=rev
Log:
Add an assertion to ensure that DSNodeEquivs always finds a node handle
for a value.
Modified:
poolalloc/trunk/lib/AssistDS/DSNodeEquivs.cpp
Modified: poolalloc/trunk/lib/AssistDS/DSNodeEquivs.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/DSNodeEquivs.cpp?rev=159604&r1=159603&r2=159604&view=diff
==============================================================================
--- poolalloc/trunk/lib/AssistDS/DSNodeEquivs.cpp (original)
+++ poolalloc/trunk/lib/AssistDS/DSNodeEquivs.cpp Mon Jul 2 17:05:41 2012
@@ -275,10 +275,9 @@
} while (!WL.empty());
}
- if (NHForV == 0 || NHForV->isNull())
- return 0;
- else
- return NHForV->getNode();
+ assert(NHForV && "Unable to find node handle for given value!");
+
+ return NHForV->getNode();
}
}
More information about the llvm-commits
mailing list