================
@@ -699,9 +699,20 @@ static RValue emitLibraryCall(CodeGenFunction &CGF, const
FunctionDecl *FD,
bool ConstWithoutErrnoAndExceptions =
Context.BuiltinInfo.isConstWithoutErrnoAndExceptions(BuiltinID);
// Restrict to target with errno, for example, MacOS doesn't set errno.
- // TODO: Support builtin function with complex type returned, eg: cacosh
+ bool CallWithPointerArgsOrPointerReturnType = false;
+ if (Call.isScalar() && Call.getScalarVal()) {
+ if (CallBase *CB = dyn_cast<CallBase>(Call.getScalarVal())) {
+ for (Value *A : CB->args())
+ if (A->getType()->isPointerTy())
+ CallWithPointerArgsOrPointerReturnType = true;
----------------
arsenm wrote:
Should probably be looking at the source signature, not the IR?
https://github.com/llvm/llvm-project/pull/107598
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits