[IR] Call DenseMap::erase directly (NFC)

We can erase an item in DenseMap without checking its membership first.
This commit is contained in:
Kazu Hirata 2022-06-12 10:47:06 -07:00
parent f13019f836
commit 974dbb20bd
1 changed files with 1 additions and 3 deletions

View File

@ -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;
}