mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-11 14:57:05 +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) {
|
unsigned MetadataContext::RegisterMDKind(const char *Name) {
|
||||||
assert (validName(Name) && "Invalid custome metadata name!");
|
assert (validName(Name) && "Invalid custome metadata name!");
|
||||||
unsigned Count = MDHandlerNames.size();
|
unsigned Count = MDHandlerNames.size();
|
||||||
StringMap<unsigned>::iterator I = MDHandlerNames.find(Name);
|
assert(MDHandlerNames.find(Name) == MDHandlerNames.end()
|
||||||
assert(I == MDHandlerNames.end() && "Already registered MDKind!");
|
&& "Already registered MDKind!");
|
||||||
MDHandlerNames[Name] = Count + 1;
|
MDHandlerNames[Name] = Count + 1;
|
||||||
return Count + 1;
|
return Count + 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user