diff options
author | Reid Kleckner <reid@kleckner.net> | 2013-12-20 23:58:52 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2013-12-20 23:58:52 +0000 |
commit | 2a50f239a90d670b3911cae9024b363cbfae87cc (patch) | |
tree | 81fc597d9ba674cb02de31f228d8e97427fa4cfb /lib/CodeGen/CGVTables.h | |
parent | ba52d9d45592b5f667001a61a24f2761b66193ff (diff) |
Eliminate the ItaniumVTableContext object from CodeGenVTables
Now CodeGenVTables has only one VTableContext object, which is either
Itanium or Microsoft.
Fixes a FIXME with no functionality change intended.
Ideally we could avoid the downcasts by pushing the things that
reference the Itanium vtable context into ItaniumCXXABI.cpp, but we're
not there yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197845 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGVTables.h')
-rw-r--r-- | lib/CodeGen/CGVTables.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/CodeGen/CGVTables.h b/lib/CodeGen/CGVTables.h index e8cd55eed8..a8768c22cc 100644 --- a/lib/CodeGen/CGVTables.h +++ b/lib/CodeGen/CGVTables.h @@ -31,10 +31,8 @@ namespace CodeGen { class CodeGenVTables { CodeGenModule &CGM; - // FIXME: Consider moving ItaniumVTContext and MicrosoftVTContext into - // respective CXXABI classes? - ItaniumVTableContext ItaniumVTContext; - OwningPtr<MicrosoftVTableContext> MicrosoftVTContext; + // FIXME: Consider moving VTContext into respective CXXABI classes? + OwningPtr<VTableContextBase> VTContext; /// VTableAddressPointsMapTy - Address points for a single vtable. typedef llvm::DenseMap<BaseSubobject, uint64_t> VTableAddressPointsMapTy; @@ -72,10 +70,12 @@ public: CodeGenVTables(CodeGenModule &CGM); - ItaniumVTableContext &getItaniumVTableContext() { return ItaniumVTContext; } + ItaniumVTableContext &getItaniumVTableContext() { + return *cast<ItaniumVTableContext>(VTContext.get()); + } MicrosoftVTableContext &getMicrosoftVTableContext() { - return *MicrosoftVTContext.get(); + return *cast<MicrosoftVTableContext>(VTContext.get()); } /// getSubVTTIndex - Return the index of the sub-VTT for the base class of the |