From: Vikram S. Adve Date: Fri, 6 Dec 2002 21:19:07 +0000 (+0000) Subject: Stronger assertion in getNodeId(): node id must exist in the map. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=44974dcdeb0880f9458f987c0de5c8a99e0705ba;p=oota-llvm.git 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 --- diff --git a/include/llvm/Analysis/IPModRef.h b/include/llvm/Analysis/IPModRef.h index 78da986268c..1b472e91f9e 100644 --- a/include/llvm/Analysis/IPModRef.h +++ b/include/llvm/Analysis/IPModRef.h @@ -153,8 +153,8 @@ public: // unsigned getNodeId (const DSNode* node) const { std::map::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;