[clang] [CIR][NFC] Use arrangeFunctionDeclaration to build function types (PR #139787)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue May 13 13:56:43 PDT 2025
================
@@ -95,6 +120,34 @@ CIRGenTypes::arrangeFreeFunctionCall(const CallArgList &args,
return arrangeFreeFunctionLikeCall(*this, cgm, args, fnType);
}
+/// Arrange the argument and result information for the declaration or
+/// definition of the given function.
+const CIRGenFunctionInfo &
+CIRGenTypes::arrangeFunctionDeclaration(const FunctionDecl *fd) {
+ if (const auto *md = dyn_cast<CXXMethodDecl>(fd)) {
+ if (md->isInstance()) {
+ cgm.errorNYI("arrangeFunctionDeclaration: instance method");
+ }
+ }
+
+ CanQualType funcTy = fd->getType()->getCanonicalTypeUnqualified();
+
+ assert(isa<FunctionType>(funcTy));
+ // TODO: setCUDAKernelCallingConvention
----------------
erichkeane wrote:
Isn't that what the `cudaSupport` assert means?
https://github.com/llvm/llvm-project/pull/139787
More information about the cfe-commits
mailing list