From 44974dcdeb0880f9458f987c0de5c8a99e0705ba Mon Sep 17 00:00:00 2001 From: "Vikram S. Adve" Date: Fri, 6 Dec 2002 21:19:07 +0000 Subject: [PATCH] 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 --- include/llvm/Analysis/IPModRef.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;