summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/MicrosoftCXXABI.cpp
diff options
context:
space:
mode:
authorTimur Iskhodzhanov <timurrrr@google.com>2013-07-30 09:46:19 +0000
committerTimur Iskhodzhanov <timurrrr@google.com>2013-07-30 09:46:19 +0000
commitdf7e7fb64296519a8a340b31eb0da9b3b67b4cb1 (patch)
treec939d63f5c01ba5667b47fb2f1b56dce83c351e8 /clang/lib/CodeGen/MicrosoftCXXABI.cpp
parentf3e218a02127420a49ba0f0712e6a25a235fd9be (diff)
downloadbcm5719-llvm-df7e7fb64296519a8a340b31eb0da9b3b67b4cb1.tar.gz
bcm5719-llvm-df7e7fb64296519a8a340b31eb0da9b3b67b4cb1.zip
Add MicrosoftVFTableContext to AST
llvm-svn: 187409
Diffstat (limited to 'clang/lib/CodeGen/MicrosoftCXXABI.cpp')
-rw-r--r--clang/lib/CodeGen/MicrosoftCXXABI.cpp19
1 files changed, 1 insertions, 18 deletions
diff --git a/clang/lib/CodeGen/MicrosoftCXXABI.cpp b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
index 0e01d8bacfc..74575c3cb50 100644
--- a/clang/lib/CodeGen/MicrosoftCXXABI.cpp
+++ b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
@@ -20,6 +20,7 @@
#include "MicrosoftVBTables.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
+#include "clang/AST/VTableBuilder.h"
using namespace clang;
using namespace CodeGen;
@@ -315,24 +316,6 @@ CharUnits MicrosoftCXXABI::GetVBPtrOffsetFromBases(const CXXRecordDecl *RD) {
return Total;
}
-/// \brief Computes the index of BaseClassDecl in the vbtable of ClassDecl.
-/// BaseClassDecl must be a morally virtual base of ClassDecl. The vbtable is
-/// an array of i32 offsets. The first entry is a self entry, and the rest are
-/// offsets from the vbptr to virtual bases. The bases are ordered the same way
-/// our vbases are ordered: as they appear in a left-to-right depth-first search
-/// of the hierarchy.
-static unsigned GetVBTableIndex(const CXXRecordDecl *ClassDecl,
- const CXXRecordDecl *BaseClassDecl) {
- unsigned VBTableIndex = 1; // Start with one to skip the self entry.
- for (CXXRecordDecl::base_class_const_iterator I = ClassDecl->vbases_begin(),
- E = ClassDecl->vbases_end(); I != E; ++I) {
- if (I->getType()->getAsCXXRecordDecl() == BaseClassDecl)
- return VBTableIndex;
- VBTableIndex++;
- }
- llvm_unreachable("BaseClassDecl must be a vbase of ClassDecl");
-}
-
llvm::Value *
MicrosoftCXXABI::GetVirtualBaseClassOffset(CodeGenFunction &CGF,
llvm::Value *This,
OpenPOWER on IntegriCloud