[clang] [OpenACC][CIR] 'bind' lowering with identifier (PR #171749)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 11 11:46:17 PST 2025
================
@@ -1721,6 +1721,70 @@ static std::string getMangledNameImpl(CIRGenModule &cgm, GlobalDecl gd,
return std::string(out.str());
}
+static FunctionDecl *
+createOpenACCBindTempFunction(ASTContext &ctx, const IdentifierInfo *bindName,
+ const FunctionDecl *protoFunc) {
+ // If this is a C no-prototype function, we can take the 'easy' way out and
+ // just create a function with no arguments/functions, etc.
+ if (!protoFunc->hasPrototype())
+ return FunctionDecl::Create(
+ ctx, /*DC=*/ctx.getTranslationUnitDecl(),
+ /*StartLoc=*/SourceLocation{}, /*NLoc=*/SourceLocation{}, bindName,
+ protoFunc->getType(), /*TInfo=*/nullptr, StorageClass::SC_None);
+
+ QualType funcTy = protoFunc->getType();
+ auto *FPT = cast<FunctionProtoType>(protoFunc->getType());
----------------
andykaylor wrote:
```suggestion
auto *fpt = cast<FunctionProtoType>(protoFunc->getType());
```
https://github.com/llvm/llvm-project/pull/171749
More information about the cfe-commits
mailing list