aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-09-29 22:05:52 +0000
committerDevang Patel <dpatel@apple.com>2009-09-29 22:05:52 +0000
commit5c888f47d45c8b462e23cc270731bff109e55e0f (patch)
treeb83be796e76fbde160ea80b28706365edd4d9609
parent91291d92510d559e84bb36184703684dcd330469 (diff)
downloadexternal_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.cpp4
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;
}