[llvm] [llvm-nm] Introduce synthetic flag (PR #138232)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 15 23:50:05 PDT 2025


================
@@ -1783,6 +1785,55 @@ getDynamicSyms(SymbolicFile &Obj) {
   return E->getDynamicSymbolIterators();
 }
 
+// Returns false if there is error found or true otherwise.
+static bool getPltSyms(SymbolicFile &Obj, std::vector<NMSymbol> &SymbolList) {
----------------
jh7370 wrote:

I think it would be better for this function to return `Error` and for the caller to report the error. Perhaps even try `Expected<std::vector<NMSymbol>>` rather than using a parameter to record the results in, but that may not be a good idea, for performance reasons, depending on the size of the vector you'd often expect.

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


More information about the llvm-commits mailing list