[llvm] Revert "[StringMap] Invalidate iterators in remove() (PR #203003)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 10 07:58:25 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp -- llvm/include/llvm/ADT/StringMap.h llvm/lib/Support/StringMap.cpp llvm/lib/Transforms/IPO/StripSymbols.cpp llvm/unittests/ADT/StringMapTest.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/IPO/StripSymbols.cpp b/llvm/lib/Transforms/IPO/StripSymbols.cpp
index ec701b6d0..965180c61 100644
--- a/llvm/lib/Transforms/IPO/StripSymbols.cpp
+++ b/llvm/lib/Transforms/IPO/StripSymbols.cpp
@@ -76,7 +76,7 @@ static void RemoveDeadConstant(Constant *C) {
// Strip the symbol table of its names.
//
static void StripSymtab(ValueSymbolTable &ST, bool PreserveDbgInfo) {
- for (ValueSymbolTable::iterator VI = ST.begin(), VE = ST.end(); VI != VE; ) {
+ for (ValueSymbolTable::iterator VI = ST.begin(), VE = ST.end(); VI != VE;) {
Value *V = VI->getValue();
++VI;
if (!isa<GlobalValue>(V) || cast<GlobalValue>(V)->hasLocalLinkage()) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/203003
More information about the llvm-commits
mailing list