================
@@ -648,12 +648,22 @@ static void replaceCallWithTryCall(cir::CallOp callOp, 
mlir::Block *unwindDest,
 
   // Build the try_call to replace the original call.
   rewriter.setInsertionPoint(callOp);
-  mlir::Type resType = callOp->getNumResults() > 0
-                           ? callOp->getResult(0).getType()
-                           : mlir::Type();
-  auto tryCallOp =
-      cir::TryCallOp::create(rewriter, loc, callOp.getCalleeAttr(), resType,
-                             normalDest, unwindDest, callOp.getArgOperands());
+  cir::TryCallOp tryCallOp;
+  if (callOp.isIndirect()) {
----------------
andykaylor wrote:

Yeah. I remembered after I posted this PR that you had mentioned that we were 
dropping attributes here. I'd like to fix that in a separate change, but I'll 
add a TODO comment now.

https://github.com/llvm/llvm-project/pull/185095
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to