nikic wrote: > LGTM, though it may also be possible to use `NumLibFuncs` as the value for `UnknownLibFunc`. I think this wouldn't work due to layering. To get NumLibFuncs we'd have to pull in the TLI header, which we can't do from IR. https://github.com/llvm/llvm-project/pull/72867