[llvm-commits] [llvm] r83114 - /llvm/trunk/lib/VMCore/Metadata.cpp
Devang Patel
dpatel at apple.com
Tue Sep 29 15:05:52 PDT 2009
Author: dpatel
Date: Tue Sep 29 17:05:52 2009
New Revision: 83114
URL: http://llvm.org/viewvc/llvm-project?rev=83114&view=rev
Log:
Lookup handler name only when assertions are enabled.
Modified:
llvm/trunk/lib/VMCore/Metadata.cpp
Modified: llvm/trunk/lib/VMCore/Metadata.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Metadata.cpp?rev=83114&r1=83113&r2=83114&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Metadata.cpp (original)
+++ llvm/trunk/lib/VMCore/Metadata.cpp Tue Sep 29 17:05:52 2009
@@ -262,8 +262,8 @@
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;
}
More information about the llvm-commits
mailing list