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

Richard Dzenis via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 23 03:03:34 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(
----------------
RIscRIpt wrote:

Thanks, I forgot about this while switching between projects.

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


More information about the llvm-commits mailing list