[clang] [CIR] Implement __builtin_return_address and __builtin_frame_address (PR #153698)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 14 15:56:16 PDT 2025


================
@@ -267,6 +267,26 @@ void convertSideEffectForCall(mlir::Operation *callOp, bool isNothrow,
   }
 }
 
+static mlir::LLVM::CallIntrinsicOp
+createCallLLVMIntrinsicOp(mlir::ConversionPatternRewriter &rewriter,
+                          mlir::Location loc, const llvm::Twine &intrinsicName,
+                          mlir::Type resultTy, mlir::ValueRange operands) {
+  auto intrinsicNameAttr =
+      mlir::StringAttr::get(rewriter.getContext(), intrinsicName);
+  return rewriter.create<mlir::LLVM::CallIntrinsicOp>(
----------------
andykaylor wrote:

```suggestion
  return mlir::LLVM::CallIntrinsicOp::create(rewriter,
```

https://github.com/llvm/llvm-project/pull/153698


More information about the cfe-commits mailing list