https://github.com/nikic requested changes to this pull request. You are looking for LLVMGlobalGetValueType. Feel free to add a comment to it referencing getFunctionType(), because you're not the first person. https://github.com/llvm/llvm-project/pull/132102