Skip to content

Conversation

@kazutakahirata
Copy link
Contributor

Identified with modernize-loop-convert.

Identified with modernize-loop-convert.
@llvmbot llvmbot added the LTO Link time optimization (regular/full LTO or ThinLTO) label Nov 21, 2025
@llvmbot
Copy link
Member

llvmbot commented Nov 21, 2025

@llvm/pr-subscribers-lto

Author: Kazu Hirata (kazutakahirata)

Changes

Identified with modernize-loop-convert.


Full diff: https://github.com/llvm/llvm-project/pull/169000.diff

1 Files Affected:

  • (modified) llvm/lib/LTO/LTOModule.cpp (+3-5)
diff --git a/llvm/lib/LTO/LTOModule.cpp b/llvm/lib/LTO/LTOModule.cpp
index 7dd06118e2a57..cce509639b499 100644
--- a/llvm/lib/LTO/LTOModule.cpp
+++ b/llvm/lib/LTO/LTOModule.cpp
@@ -620,13 +620,11 @@ void LTOModule::parseSymbols() {
   }
 
   // make symbols for all undefines
-  for (StringMap<NameAndAttributes>::iterator u =_undefines.begin(),
-         e = _undefines.end(); u != e; ++u) {
+  for (const auto &[Key, Value] : _undefines) {
     // If this symbol also has a definition, then don't make an undefine because
     // it is a tentative definition.
-    if (_defines.count(u->getKey())) continue;
-    NameAndAttributes info = u->getValue();
-    _symbols.push_back(info);
+    if (!_defines.count(Key))
+      _symbols.push_back(Value);
   }
 }
 

@github-actions
Copy link

github-actions bot commented Nov 21, 2025

🐧 Linux x64 Test Results

  • 186451 tests passed
  • 4868 tests skipped

@kazutakahirata kazutakahirata merged commit f7e0432 into llvm:main Nov 21, 2025
10 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_20251120_clang_tidy_modernize-loop-convert_LTO branch November 21, 2025 17:10
aadeshps-mcw pushed a commit to aadeshps-mcw/llvm-project that referenced this pull request Nov 26, 2025
Identified with modernize-loop-convert.
Priyanshu3820 pushed a commit to Priyanshu3820/llvm-project that referenced this pull request Nov 26, 2025
Identified with modernize-loop-convert.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LTO Link time optimization (regular/full LTO or ThinLTO)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants