[PATCH] D11859: Generating vptr assume loads
Piotr Padlewski via cfe-commits
cfe-commits at lists.llvm.org
Sun Aug 16 17:27:55 PDT 2015
Prazek marked an inline comment as done.
================
Comment at: lib/CodeGen/CGCXXABI.h:352
@@ +351,3 @@
+ isVirtualOffsetNeededForVTableField(CodeGenFunction &CGF,
+ const CXXRecordDecl *NearestVBase) = 0;
+
----------------
rjmccall wrote:
> This method does not need to be passed a CodeGenFunction&, but it should take a complete CodeGenFunction::VPtr, not just this one random field from it.
yep, I thought that there will be problem with placing VPtr class, but I haven't noticed that CGCXXAABI includes CodeGenFunction.
CodeGenFunction is required for ItaniumABI
return NeedsVTTParameter(CGF.CurGD);
================
Comment at: lib/CodeGen/CGClass.cpp:1862
@@ +1861,3 @@
+ for (const VPtr &vptr : getVTablePointers(ClassDecl))
+ if (CGM.getCXXABI().canInitializeVPtr(vptr.VTableClass, vptr.Base.getBase(),
+ vptr.NearestVBase))
----------------
rjmccall wrote:
> As mentioned elsewhere, you can skip this entire loop if doStructorsInitializeVTables returns false.
hmm, I think it is not true. This code checks if each base that we are initilizing/generating vptr assumption don't have novtable specifier. If one base has it, it doesn't mean that we don't have to do it for other base
http://reviews.llvm.org/D11859
More information about the cfe-commits
mailing list