[PATCH] D25540: Implement MS _ReturnAddress and _AddressOfReturnAddress intrinsics

David Majnemer via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 13 00:58:24 PDT 2016


majnemer added inline comments.


================
Comment at: lib/CodeGen/CGBuiltin.cpp:1151-1152
+  case Builtin::BI_ReturnAddress: {
+    Value *Depth =
+        Constant::getNullValue(ConvertType(getContext().UnsignedIntTy));
+    Value *F = CGM.getIntrinsic(Intrinsic::returnaddress);
----------------
I'd just use `Builder.getInt32(0)`, this will DTRT regardless of whatever UnsignedIntTy is.


https://reviews.llvm.org/D25540





More information about the cfe-commits mailing list