[clang] [clang] Support 'this' position for lifetimebound attribute (PR #115021)

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 5 10:20:50 PST 2024


================
@@ -793,12 +802,22 @@ class CXXMethodTableInfo
     return static_cast<size_t>(key.hashValue());
   }
 
-  unsigned getUnversionedInfoSize(const CXXMethodInfo &OMI) {
-    return getFunctionInfoSize(OMI);
+  unsigned getUnversionedInfoSize(const CXXMethodInfo &CxxMI) {
+    auto size = getFunctionInfoSize(CxxMI) + 1;
+    if (CxxMI.This)
+      size += getParamInfoSize(*CxxMI.This);
+    return size;
   }
 
-  void emitUnversionedInfo(raw_ostream &OS, const CXXMethodInfo &OMI) {
-    emitFunctionInfo(OS, OMI);
+  void emitUnversionedInfo(raw_ostream &OS, const CXXMethodInfo &CxxMI) {
----------------
compnerd wrote:

I would just use `MI` or `CMI` instead of `CxxMI`.

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


More information about the cfe-commits mailing list