[PATCH] D11859: Generating vptr assume loads
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 10 12:20:50 PDT 2015
rsmith added inline comments.
================
Comment at: include/clang/AST/VTableBuilder.h:387-391
@@ -386,7 +386,3 @@
- // Copy constructor.
- // FIXME: Uncomment when we've moved to C++11.
- // VPtrInfo(const VPtrInfo &) = default;
-
/// The vtable will hold all of the virtual bases or virtual methods of
/// ReusingBase. This may or may not be the same class as VPtrSubobject.Base.
----------------
Please commit this cleanup separately.
================
Comment at: lib/CodeGen/CGCXXABI.h:349-357
@@ -348,1 +348,11 @@
+ virtual bool isVirtualOffsetNeeded(CodeGenFunction &CGF,
+ const CXXRecordDecl *NearestVBase) = 0;
+
+ virtual bool canInitilizeVPtr(const CXXRecordDecl *VTableClass,
+ const CXXRecordDecl *Base,
+ const CXXRecordDecl *NearestVBase) = 0;
+
+ virtual llvm::Constant *getVTableAddressPoint(
+ BaseSubobject Base, const CXXRecordDecl *VTableClass) = 0;
+
----------------
Please add documentation comments for these.
================
Comment at: lib/CodeGen/CGCXXABI.h:352
@@ +351,3 @@
+
+ virtual bool canInitilizeVPtr(const CXXRecordDecl *VTableClass,
+ const CXXRecordDecl *Base,
----------------
Typo `Initilize` -> `Initialize`
================
Comment at: lib/CodeGen/CGCXXABI.h:360-362
@@ -349,5 +359,5 @@
/// Get the address point of the vtable for the given base subobject while
/// building a constructor or a destructor. On return, NeedsVirtualOffset
/// tells if a virtual base adjustment is needed in order to get the offset
/// of the base subobject.
virtual llvm::Value *getVTableAddressPointInStructor(
----------------
Comment is out of date.
================
Comment at: lib/CodeGen/CGClass.cpp:1831-1832
@@ +1830,4 @@
+
+ // generate vtable assumptions if we are not in another ctor and
+ // if we calling dynamic class ctor
+ if (CGM.getCodeGenOpts().OptimizationLevel > 0 &&
----------------
Please start comments with a capital letter and end them with a full stop.
================
Comment at: lib/CodeGen/ItaniumCXXABI.cpp:1404
@@ +1403,3 @@
+ const CXXRecordDecl *NearestVBase) {
+ // TODO check it
+ if ((Base.getBase()->getNumVBases() || NearestVBase != nullptr) &&
----------------
majnemer wrote:
> Check what?
Is this done? :)
http://reviews.llvm.org/D11859
More information about the cfe-commits
mailing list