forked from OSchip/llvm-project
[IR] Call DenseMap::erase directly (NFC)
We can erase an item in DenseMap without checking its membership first.
This commit is contained in:
parent
f13019f836
commit
974dbb20bd
|
@ -236,9 +236,7 @@ void GlobalValue::setSanitizerMetadata(const SanitizerMetadata &Meta) {
|
|||
void GlobalValue::removeSanitizerMetadata() {
|
||||
DenseMap<const GlobalValue *, SanitizerMetadata> &MetadataMap =
|
||||
getContext().pImpl->GlobalValueSanitizerMetadata;
|
||||
auto It = MetadataMap.find(this);
|
||||
if (It != MetadataMap.end())
|
||||
MetadataMap.erase(It);
|
||||
MetadataMap.erase(this);
|
||||
HasSanitizerMetadata = false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue