Stronger assertion in getNodeId(): node id must exist in the map.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4949 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Vikram S. Adve 2002-12-06 21:19:07 +00:00
parent bac0622ef9
commit 44974dcdeb

View File

@ -153,8 +153,8 @@ public:
//
unsigned getNodeId (const DSNode* node) const {
std::map<const DSNode*, unsigned>::const_iterator iter = NodeIds.find(node);
assert(iter == NodeIds.end() || iter->second < funcModRefInfo.getSize());
return (iter == NodeIds.end())? funcModRefInfo.getSize() : iter->second;
assert(iter != NodeIds.end() && iter->second < funcModRefInfo.getSize());
return iter->second;
}
unsigned getNodeId (const Value* value) const;