[llvm] [MC] Use range-based for loops (NFC) (PR #139354)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Fri May 9 22:34:31 PDT 2025


================
@@ -477,10 +477,10 @@ MCSymbolXCOFF *MCContext::createXCOFFSymbolImpl(const MCSymbolTableEntry *Name,
 
   // Append the hex values of '_' and invalid characters with "_Renamed..";
   // at the same time replace invalid characters with '_'.
-  for (size_t I = 0; I < InvalidName.size(); ++I) {
-    if (!MAI->isAcceptableChar(InvalidName[I]) || InvalidName[I] == '_') {
-      raw_svector_ostream(ValidName).write_hex(InvalidName[I]);
-      InvalidName[I] = '_';
+  for (char &I : InvalidName) {
----------------
kazutakahirata wrote:

Fixed in the latest revision.  Thanks!

https://github.com/llvm/llvm-project/pull/139354


More information about the llvm-commits mailing list