================ @@ -2751,7 +2751,10 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) { if (RequiresCast) { unsigned Size = getContext().getTypeSize(QTy); - Ty = llvm::IntegerType::get(getLLVMContext(), Size); + if (Size) + Ty = llvm::IntegerType::get(getLLVMContext(), Size); + else + CGM.Error(S.getAsmLoc(), "Output operand is sizeless!"); ---------------- efriedma-quic wrote:
Can we use the SourceLocation of the specific operand in question, instead of using `S.getAsmLoc()`, which points at the beginning of the asm statement? Diagnostics aren't capitalized, and don't end in punctuation. Maybe say "size zero" instead of "sizeless". https://github.com/llvm/llvm-project/pull/99849 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits