diff options
Diffstat (limited to 'llvm/docs/ProgrammersManual.rst')
-rw-r--r-- | llvm/docs/ProgrammersManual.rst | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/llvm/docs/ProgrammersManual.rst b/llvm/docs/ProgrammersManual.rst index 7faba112ffe..94555d9d4ff 100644 --- a/llvm/docs/ProgrammersManual.rst +++ b/llvm/docs/ProgrammersManual.rst @@ -3491,11 +3491,17 @@ Important Public Members of the ``Module`` class Look up the specified function in the ``Module`` SymbolTable_. If it does not exist, return ``null``. -* ``Function *getOrInsertFunction(const std::string &Name, const FunctionType - *T)`` - - Look up the specified function in the ``Module`` SymbolTable_. If it does not - exist, add an external declaration for the function and return it. +* ``FunctionCallee getOrInsertFunction(const std::string &Name, + const FunctionType *T)`` + + Look up the specified function in the ``Module`` SymbolTable_. If + it does not exist, add an external declaration for the function and + return it. Note that the function signature already present may not + match the requested signature. Thus, in order to enable the common + usage of passing the result directly to EmitCall, the return type is + a struct of ``{FunctionType *T, Constant *FunctionPtr}``, rather + than simply the ``Function*`` with potentially an unexpected + signature. * ``std::string getTypeName(const Type *Ty)`` |