================
@@ -900,13 +900,15 @@ void CXXABILoweringPass::runOnOperation() {
auto mod = mlir::cast<mlir::ModuleOp>(getOperation());
mlir::MLIRContext *ctx = mod.getContext();
- std::unique_ptr<cir::LowerModule> lowerModule = cir::createLowerModule(mod);
+ auto diag = [&] {
+ return mod.emitWarning("cannot create a CIR lower module, skipping the ")
+ << getName() << " pass: ";
+ };
+ std::unique_ptr<cir::LowerModule> lowerModule =
+ cir::createLowerModule(mod, diag);
// If lower module is not available, skip the ABI lowering pass.
----------------
ianayl wrote:
Judging by this comment, I'm operating under the assumption that
CXXABILoweringPass should skip gracefully if it can't obtain a CIR lower
module, and thus a warning is actually the correct diagnostic to issue here
instead of an error. Let me know if this should be a hard error +
signalPassFailure instead.
https://github.com/llvm/llvm-project/pull/230003
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits