diff options
author | Timur Iskhodzhanov <timurrrr@google.com> | 2013-09-27 14:48:01 +0000 |
---|---|---|
committer | Timur Iskhodzhanov <timurrrr@google.com> | 2013-09-27 14:48:01 +0000 |
commit | 8b5987eba5a080962cbc98ce5f006db3aa62ae2e (patch) | |
tree | e0986fcd7045e6a7713a09ebe39936cec8263dde /clang/lib/CodeGen/CGCXXABI.h | |
parent | f56ddf7fd1ea405e29b603f5afd54b736d8031f3 (diff) | |
download | bcm5719-llvm-8b5987eba5a080962cbc98ce5f006db3aa62ae2e.tar.gz bcm5719-llvm-8b5987eba5a080962cbc98ce5f006db3aa62ae2e.zip |
Abstract out the emission of vtables, add basic support for vtable emission when using -cxx-abi microsoft
Reviewed at http://llvm-reviews.chandlerc.com/D1532
llvm-svn: 191523
Diffstat (limited to 'clang/lib/CodeGen/CGCXXABI.h')
-rw-r--r-- | clang/lib/CodeGen/CGCXXABI.h | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGCXXABI.h b/clang/lib/CodeGen/CGCXXABI.h index 37f678f4b55..3a1c8d198dc 100644 --- a/clang/lib/CodeGen/CGCXXABI.h +++ b/clang/lib/CodeGen/CGCXXABI.h @@ -303,6 +303,29 @@ public: CallExpr::const_arg_iterator ArgBeg, CallExpr::const_arg_iterator ArgEnd) = 0; + /// Emits the VTable definitions required for the given record type. + virtual void emitVTableDefinitions(CodeGenVTables &CGVT, + const CXXRecordDecl *RD) = 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; + + /// Get the address point of the vtable for the given base subobject while + /// building a constexpr. + virtual llvm::Constant * + getVTableAddressPointForConstExpr(BaseSubobject Base, + const CXXRecordDecl *VTableClass) = 0; + + /// Get the address of the vtable for the given record decl which should be + /// used for the vptr at the given offset in RD. + virtual llvm::GlobalVariable *getAddrOfVTable(const CXXRecordDecl *RD, + CharUnits VPtrOffset) = 0; + /// Build a virtual function pointer in the ABI-specific way. virtual llvm::Value *getVirtualFunctionPointer(CodeGenFunction &CGF, GlobalDecl GD, @@ -319,9 +342,7 @@ public: /// Emit any tables needed to implement virtual inheritance. For Itanium, /// this emits virtual table tables. For the MSVC++ ABI, this emits virtual /// base tables. - virtual void - EmitVirtualInheritanceTables(llvm::GlobalVariable::LinkageTypes Linkage, - const CXXRecordDecl *RD) = 0; + virtual void emitVirtualInheritanceTables(const CXXRecordDecl *RD) = 0; virtual void EmitReturnFromThunk(CodeGenFunction &CGF, RValue RV, QualType ResultType); |