mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-14 15:39:06 +00:00
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
This commit is contained in:
parent
74da40a96f
commit
11716d766b
@ -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…
Reference in New Issue
Block a user