summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCXXABI.h
diff options
context:
space:
mode:
authorPiotr Padlewski <prazek@google.com>2015-08-21 18:28:00 +0000
committerPiotr Padlewski <prazek@google.com>2015-08-21 18:28:00 +0000
commit910a059e428bc1258cc1646ed1beabb8132d5754 (patch)
tree8cdd10c3cd6f29e9f9e58d44f56ca66628697a5c /clang/lib/CodeGen/CGCXXABI.h
parent7830c2d7260264cca5ce10beae3e93614da03e04 (diff)
downloadbcm5719-llvm-910a059e428bc1258cc1646ed1beabb8132d5754.tar.gz
bcm5719-llvm-910a059e428bc1258cc1646ed1beabb8132d5754.zip
Generating assumption loads of vptr after ctor call (fixed)
Generating call assume(icmp %vtable, %global_vtable) after constructor call for devirtualization purposes. For more info go to: http://lists.llvm.org/pipermail/cfe-dev/2015-July/044227.html Edit: Fixed version because of PR24479. http://reviews.llvm.org/D11859 llvm-svn: 245721
Diffstat (limited to 'clang/lib/CodeGen/CGCXXABI.h')
-rw-r--r--clang/lib/CodeGen/CGCXXABI.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CGCXXABI.h b/clang/lib/CodeGen/CGCXXABI.h
index 5ef409ecdee..158d29ab510 100644
--- a/clang/lib/CodeGen/CGCXXABI.h
+++ b/clang/lib/CodeGen/CGCXXABI.h
@@ -346,13 +346,25 @@ public:
virtual void emitVTableDefinitions(CodeGenVTables &CGVT,
const CXXRecordDecl *RD) = 0;
+ /// Checks if ABI requires extra virtual offset for vtable field.
+ virtual bool
+ isVirtualOffsetNeededForVTableField(CodeGenFunction &CGF,
+ CodeGenFunction::VPtr Vptr) = 0;
+
+ /// Checks if ABI requires to initilize vptrs for given dynamic class.
+ virtual bool doStructorsInitializeVPtrs(const CXXRecordDecl *VTableClass) = 0;
+
+ /// Get the address point of the vtable for the given base subobject.
+ virtual llvm::Constant *
+ getVTableAddressPoint(BaseSubobject Base,
+ const CXXRecordDecl *VTableClass) = 0;
+
/// 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(
- CodeGenFunction &CGF, const CXXRecordDecl *RD, BaseSubobject Base,
- const CXXRecordDecl *NearestVBase, bool &NeedsVirtualOffset) = 0;
+ /// building a constructor or a destructor.
+ virtual llvm::Value *
+ getVTableAddressPointInStructor(CodeGenFunction &CGF, const CXXRecordDecl *RD,
+ BaseSubobject Base,
+ const CXXRecordDecl *NearestVBase) = 0;
/// Get the address point of the vtable for the given base subobject while
/// building a constexpr.
OpenPOWER on IntegriCloud