[clang] [CIR] Add token type and none token attribute for coroutine intrinsics (PR #194515)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 28 06:22:18 PDT 2026
================
@@ -1642,4 +1640,80 @@ Address CIRGenFunction::emitVAListRef(const Expr *e) {
return emitLValue(e).getAddress();
}
+cir::FuncType
+CIRGenFunction::getIntrinsicType(mlir::MLIRContext *context,
+ llvm::Intrinsic::ID id,
+ const IntrinsicTypeOptions &opts) {
+ using namespace llvm::Intrinsic;
+
+ SmallVector<IITDescriptor, 8> table;
+ getIntrinsicInfoTableEntries(id, table);
+
+ ArrayRef<IITDescriptor> tableRef = table;
+ mlir::Type resultTy = decodeFixedType(tableRef, context, opts);
+
+ SmallVector<mlir::Type, 8> argTypes;
+ bool isVarArg = false;
+ while (!tableRef.empty()) {
----------------
erichkeane wrote:
Why a while loop and not a range-for loop?
Also, how is this not an infinite loop? `tableRef` doesn't seem to be modified here.
https://github.com/llvm/llvm-project/pull/194515
More information about the cfe-commits
mailing list