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 | b60a3d5bc1de66dfe7532d249d75ba8f4e9d14e7 (patch) | |
| tree | d408e7a7af3b5fd1e4b6a5ff22f82f95e518a067 /clang/lib/CodeGen/CGVTables.h | |
| parent | 3275dc4586eea2b769955e1c7160f2cb99f7a010 (diff) | |
| download | bcm5719-llvm-b60a3d5bc1de66dfe7532d249d75ba8f4e9d14e7.tar.gz bcm5719-llvm-b60a3d5bc1de66dfe7532d249d75ba8f4e9d14e7.zip | |
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
Diffstat (limited to 'clang/lib/CodeGen/CGVTables.h')
| -rw-r--r-- | clang/lib/CodeGen/CGVTables.h | 12 |
1 files changed, 6 insertions, 6 deletions
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<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 |

