[PATCH] D11859: Generating vptr assume loads

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 10 12:22:35 PDT 2015


rsmith added inline comments.

================
Comment at: lib/CodeGen/CGClass.cpp:2098
@@ -2063,3 +2097,3 @@
     // Initialize the vtable pointer for this base.
-    InitializeVTablePointer(Base, NearestVBase, OffsetFromNearestVBase,
-                            VTableClass);
+    VPtr vptr{Base, NearestVBase, OffsetFromNearestVBase, VTableClass};
+    vptrs.push_back(vptr);
----------------
Prazek wrote:
> majnemer wrote:
> > This kind of initialization is not very common in LLVM.
> is It worth adding constructor just to change { with ( ? 
No, just add an `=` before the `{`.


http://reviews.llvm.org/D11859





More information about the cfe-commits mailing list