[clang] [CIR] Fix calling defined functions (PR #137271)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 25 09:41:35 PDT 2025
================
@@ -773,6 +773,58 @@ cir::FuncOp CIRGenModule::getOrCreateCIRFunction(
StringRef mangledName, mlir::Type funcType, GlobalDecl gd, bool forVTable,
bool dontDefer, bool isThunk, ForDefinition_t isForDefinition,
mlir::ArrayAttr extraAttrs) {
+ const Decl *d = gd.getDecl();
+
+ if (isThunk)
+ errorNYI(d->getSourceRange(), "getOrCreateCIRFunction: thunk");
+
+ // In what follows, we continue past 'errorNYI' as if nothing happened because
+ // the rest of the implementation is better than doing nothing.
+
+ // Any attempts to use a MultiVersion function should result in retrieving the
----------------
andykaylor wrote:
I think you're right. When this comment was originally written (by you, incidentally), line 793 immediately followed line 786, so the comment made sense here. When the OpenMP handling was added, the comment wasn't moved but it should have been. I'll fix that here. The classic codegen will still have this comment location issue.
https://github.com/llvm/llvm-project/pull/137271
More information about the cfe-commits
mailing list