diff options
author | Devang Patel <dpatel@apple.com> | 2009-09-29 22:05:52 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-09-29 22:05:52 +0000 |
commit | 5c888f47d45c8b462e23cc270731bff109e55e0f (patch) | |
tree | b83be796e76fbde160ea80b28706365edd4d9609 | |
parent | 91291d92510d559e84bb36184703684dcd330469 (diff) | |
download | external_llvm-5c888f47d45c8b462e23cc270731bff109e55e0f.zip external_llvm-5c888f47d45c8b462e23cc270731bff109e55e0f.tar.gz external_llvm-5c888f47d45c8b462e23cc270731bff109e55e0f.tar.bz2 |
Lookup handler name only when assertions are enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83114 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/VMCore/Metadata.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VMCore/Metadata.cpp b/lib/VMCore/Metadata.cpp index 54e5242..2f2345f 100644 --- a/lib/VMCore/Metadata.cpp +++ b/lib/VMCore/Metadata.cpp @@ -262,8 +262,8 @@ NamedMDNode::~NamedMDNode() { unsigned MetadataContext::RegisterMDKind(const char *Name) { assert (validName(Name) && "Invalid custome metadata name!"); unsigned Count = MDHandlerNames.size(); - StringMap<unsigned>::iterator I = MDHandlerNames.find(Name); - assert(I == MDHandlerNames.end() && "Already registered MDKind!"); + assert(MDHandlerNames.find(Name) == MDHandlerNames.end() + && "Already registered MDKind!"); MDHandlerNames[Name] = Count + 1; return Count + 1; } |