================
@@ -1706,7 +1706,12 @@ CIRGenFunction::emitX86BuiltinExpr(unsigned builtinID, 
const CallExpr *expr) {
                                     cir::SyncScopeKind::SingleThread));
     return mlir::Value{};
   }
-  case X86::BI_AddressOfReturnAddress:
+  case X86::BI_AddressOfReturnAddress: {
+    mlir::Location loc = getLoc(expr->getExprLoc());
+    mlir::Value addr = emitIntrinsicCallOp(
+        builder, loc, "addressofreturnaddress", allocaInt8PtrTy);
----------------
andykaylor wrote:

We have a CIR operation to get the return address (`CIR_ReturnAddrOp`) so we 
should probably add an operation for this also. Look at 
https://github.com/llvm/llvm-project/pull/153698 for an example.

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

Reply via email to