[clang] [Clang][CodeGen] Lookup standard library declarations for builtins to… (PR #204792)
Hans Wennborg via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 22 07:03:23 PDT 2026
https://github.com/zmodem commented:
Added modules and codegen experts.
Looking at `CodeGenModule::getBuiltinLibFunction` it's not clear to me what difference it makes whether the function (e.g. `fabsf`) exists in the AST or not.
The code just seems to figure out the name, and then call `GetOrCreateLLVMFunction` on it?
I also wonder how this should work in the case when the math function is not in the AST before -- neither by including math.h or through a module. Shouldn't the builtin work anyway?
Clang (clang-cl) knows whether it's compiling with `/MD` or `/MT` etc. Maybe it should just add the `dllimport` as appropriate for these functions, rather than relying on the math header/module being included?
https://github.com/llvm/llvm-project/pull/204792
More information about the cfe-commits
mailing list