llvmReferencedUndefinedSymbolsWithTools
fun llvmReferencedUndefinedSymbolsWithTools(executor: NativeToolExecutor, moduleFile: File, originalUndefinedSymbols: Set<String>, symbolKinds: Map<String, LlvmSymbolKind>, strippedModuleFile: File, optBinary: String, nmBinary: String): Set<String>
Removes debug information from a temporary module, then removes unused function prototypes with LLVM's use-def aware pass. Debug-only DISubprogram attachments must not keep declarations alive: they describe source symbols but do not represent executable calls, function-pointer initializers, aliases, or other IR dependencies. Undefined globals are retained even when they have no current IR use: vtables and other externally populated globals are boundary state, and callers do not have enough whole-program evidence to discard them. Unknown symbol kinds are retained for the same reason.