[llvm] [llvm-objcopy] Add support of symbol modification flags for MachO (PR #120895)

Alexander Shaposhnikov via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 22 21:20:06 PST 2024


================
@@ -33,6 +33,19 @@ SymbolEntry *SymbolTable::getSymbolByIndex(uint32_t Index) {
       static_cast<const SymbolTable *>(this)->getSymbolByIndex(Index));
 }
 
+void SymbolTable::updateSymbols(function_ref<void(SymbolEntry &)> Callable) {
+  for (auto &Sym : Symbols)
+    Callable(*Sym);
+
+  // Partition symbols: local < defined external < undefined external.
+  auto it_ext = std::stable_partition(
----------------
alexander-shaposhnikov wrote:

nit: https://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly 
```it_ext -> ExternalSymbolsBegin```

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


More information about the llvm-commits mailing list