mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-27 06:54:30 +00:00
Lookup handler name only when assertions are enabled.
llvm-svn: 83114
This commit is contained in:
parent
39b5b72d74
commit
c1e370a29c
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user