diff options
Diffstat (limited to 'contrib/llvm/tools/clang/lib/CodeGen/CGVTables.h')
-rw-r--r-- | contrib/llvm/tools/clang/lib/CodeGen/CGVTables.h | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.h b/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.h index e8cd55e..69cf079 100644 --- a/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.h +++ b/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.h @@ -31,11 +31,8 @@ namespace CodeGen { class CodeGenVTables { CodeGenModule &CGM; - // FIXME: Consider moving ItaniumVTContext and MicrosoftVTContext into - // respective CXXABI classes? - ItaniumVTableContext ItaniumVTContext; - OwningPtr<MicrosoftVTableContext> MicrosoftVTContext; - + VTableContextBase *VTContext; + /// VTableAddressPointsMapTy - Address points for a single vtable. typedef llvm::DenseMap<BaseSubobject, uint64_t> VTableAddressPointsMapTy; @@ -64,18 +61,19 @@ public: /// decl. /// \param Components - The vtable components; this is really an array of /// VTableComponents. - llvm::Constant *CreateVTableInitializer(const CXXRecordDecl *RD, - const VTableComponent *Components, - unsigned NumComponents, - const VTableLayout::VTableThunkTy *VTableThunks, - unsigned NumVTableThunks); + llvm::Constant *CreateVTableInitializer( + const CXXRecordDecl *RD, const VTableComponent *Components, + unsigned NumComponents, const VTableLayout::VTableThunkTy *VTableThunks, + unsigned NumVTableThunks, llvm::Constant *RTTI); CodeGenVTables(CodeGenModule &CGM); - ItaniumVTableContext &getItaniumVTableContext() { return ItaniumVTContext; } + ItaniumVTableContext &getItaniumVTableContext() { + return *cast<ItaniumVTableContext>(VTContext); + } MicrosoftVTableContext &getMicrosoftVTableContext() { - return *MicrosoftVTContext.get(); + return *cast<MicrosoftVTableContext>(VTContext); } /// getSubVTTIndex - Return the index of the sub-VTT for the base class of the @@ -100,7 +98,7 @@ public: VTableAddressPointsMapTy& AddressPoints); - /// GetAddrOfVTable - Get the address of the VTT for the given record decl. + /// GetAddrOfVTT - Get the address of the VTT for the given record decl. llvm::GlobalVariable *GetAddrOfVTT(const CXXRecordDecl *RD); /// EmitVTTDefinition - Emit the definition of the given vtable. |