[clang] [clang][bytecode] Use stack offsets for This/RVO ptrs (PR #160285)

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 23 20:20:51 PDT 2025


================
@@ -58,15 +58,12 @@ InterpFrame::InterpFrame(InterpState &S, const Function *Func, CodePtr RetPC,
   // If the fuction has a This pointer, that one is next.
   // Then follow the actual arguments (but those are handled
   // in getParamPointer()).
-  if (Func->hasRVO())
-    RVOPtr = stackRef<Pointer>(0);
-
-  if (Func->hasThisPointer()) {
-    if (Func->hasRVO())
-      This = stackRef<Pointer>(sizeof(Pointer));
-    else
-      This = stackRef<Pointer>(0);
+  if (Func->hasRVO()) {
+    // RVOPtrOffset is always 0.
----------------
shafik wrote:

Maybe saying `getRVOPtr()` always has a zero offset?

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


More information about the cfe-commits mailing list