aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CGVTables.cpp
diff options
context:
space:
mode:
authorTimur Iskhodzhanov <timurrrr@google.com>2013-11-05 15:54:58 +0000
committerTimur Iskhodzhanov <timurrrr@google.com>2013-11-05 15:54:58 +0000
commit5877663622877127b0cfdf8230bd627271f50d9c (patch)
treeec078930ca0cb38f7dfd775bcc0f002675d16802 /clang/lib/CodeGen/CGVTables.cpp
parent41778fd28f9b6877e34dcced85deb2c6dec50b4a (diff)
downloadllvm-5877663622877127b0cfdf8230bd627271f50d9c.zip
llvm-5877663622877127b0cfdf8230bd627271f50d9c.tar.gz
llvm-5877663622877127b0cfdf8230bd627271f50d9c.tar.bz2
Fix vbtable indices when a class shares the vbptr with a non-virtual base
llvm-svn: 194082
Diffstat (limited to 'clang/lib/CodeGen/CGVTables.cpp')
-rw-r--r--clang/lib/CodeGen/CGVTables.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/clang/lib/CodeGen/CGVTables.cpp b/clang/lib/CodeGen/CGVTables.cpp
index 996bd90..5d657b0 100644
--- a/clang/lib/CodeGen/CGVTables.cpp
+++ b/clang/lib/CodeGen/CGVTables.cpp
@@ -30,12 +30,12 @@ using namespace clang;
using namespace CodeGen;
CodeGenVTables::CodeGenVTables(CodeGenModule &CGM)
- : CGM(CGM), VTContext(CGM.getContext()) {
+ : CGM(CGM), ItaniumVTContext(CGM.getContext()) {
if (CGM.getTarget().getCXXABI().isMicrosoft()) {
// FIXME: Eventually, we should only have one of V*TContexts available.
// Today we use both in the Microsoft ABI as MicrosoftVFTableContext
// is not completely supported in CodeGen yet.
- VFTContext.reset(new MicrosoftVFTableContext(CGM.getContext()));
+ MicrosoftVTContext.reset(new MicrosoftVTableContext(CGM.getContext()));
}
}
@@ -439,10 +439,10 @@ void CodeGenVTables::EmitThunks(GlobalDecl GD)
return;
const VTableContextBase::ThunkInfoVectorTy *ThunkInfoVector;
- if (VFTContext.isValid()) {
- ThunkInfoVector = VFTContext->getThunkInfo(GD);
+ if (MicrosoftVTContext.isValid()) {
+ ThunkInfoVector = MicrosoftVTContext->getThunkInfo(GD);
} else {
- ThunkInfoVector = VTContext.getThunkInfo(GD);
+ ThunkInfoVector = ItaniumVTContext.getThunkInfo(GD);
}
if (!ThunkInfoVector)
@@ -581,9 +581,8 @@ CodeGenVTables::GenerateConstructionVTable(const CXXRecordDecl *RD,
DI->completeClassData(Base.getBase());
OwningPtr<VTableLayout> VTLayout(
- VTContext.createConstructionVTableLayout(Base.getBase(),
- Base.getBaseOffset(),
- BaseIsVirtual, RD));
+ ItaniumVTContext.createConstructionVTableLayout(
+ Base.getBase(), Base.getBaseOffset(), BaseIsVirtual, RD));
// Add the address points.
AddressPoints = VTLayout->getAddressPoints();