From b60a3d5bc1de66dfe7532d249d75ba8f4e9d14e7 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 20 Dec 2013 23:58:52 +0000 Subject: 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. llvm-svn: 197845 --- clang/lib/CodeGen/CGVTables.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'clang/lib/CodeGen/CGVTables.h') diff --git a/clang/lib/CodeGen/CGVTables.h b/clang/lib/CodeGen/CGVTables.h index e8cd55eed80..a8768c22cc2 100644 --- a/clang/lib/CodeGen/CGVTables.h +++ b/clang/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 MicrosoftVTContext; + // FIXME: Consider moving VTContext into respective CXXABI classes? + OwningPtr VTContext; /// VTableAddressPointsMapTy - Address points for a single vtable. typedef llvm::DenseMap VTableAddressPointsMapTy; @@ -72,10 +70,12 @@ public: CodeGenVTables(CodeGenModule &CGM); - ItaniumVTableContext &getItaniumVTableContext() { return ItaniumVTContext; } + ItaniumVTableContext &getItaniumVTableContext() { + return *cast(VTContext.get()); + } MicrosoftVTableContext &getMicrosoftVTableContext() { - return *MicrosoftVTContext.get(); + return *cast(VTContext.get()); } /// getSubVTTIndex - Return the index of the sub-VTT for the base class of the -- cgit v1.2.3