diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2024-01-24 19:11:41 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2024-01-24 19:11:41 +0000 |
| commit | 4df029cc74e5ec124f14a5682e44999ce4f086df (patch) | |
| tree | fa2e8720472930df97920b4185215c910159f10d /llvm/lib/Bitcode/Writer/ValueEnumerator.cpp | |
| parent | 950076cd18f3fa9d789b4add9d405898efff09a5 (diff) | |
Diffstat (limited to 'llvm/lib/Bitcode/Writer/ValueEnumerator.cpp')
| -rw-r--r-- | llvm/lib/Bitcode/Writer/ValueEnumerator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp index 998f629aaa4e..fccb2a606f7e 100644 --- a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp +++ b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp @@ -1108,8 +1108,8 @@ void ValueEnumerator::purgeFunction() { /// Remove purged values from the ValueMap. for (unsigned i = NumModuleValues, e = Values.size(); i != e; ++i) ValueMap.erase(Values[i].first); - for (unsigned i = NumModuleMDs, e = MDs.size(); i != e; ++i) - MetadataMap.erase(MDs[i]); + for (const Metadata *MD : llvm::drop_begin(MDs, NumModuleMDs)) + MetadataMap.erase(MD); for (const BasicBlock *BB : BasicBlocks) ValueMap.erase(BB); |
