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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to