Make GenerateVtable a private member function of CGVtableInfo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90684 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGVtable.h b/lib/CodeGen/CGVtable.h
index 86633d4..bfffb67 100644
--- a/lib/CodeGen/CGVtable.h
+++ b/lib/CodeGen/CGVtable.h
@@ -18,7 +18,7 @@
#include "GlobalDecl.h"
namespace llvm {
- class Constant;
+ class GlobalVariable;
}
namespace clang {
@@ -79,7 +79,8 @@
typedef llvm::DenseMap<ClassPairTy, int64_t> VirtualBaseClassIndiciesTy;
VirtualBaseClassIndiciesTy VirtualBaseClassIndicies;
- llvm::DenseMap<const CXXRecordDecl *, llvm::Constant *> Vtables;
+ /// Vtables - All the vtables which have been defined.
+ llvm::DenseMap<const CXXRecordDecl *, llvm::GlobalVariable *> Vtables;
/// NumVirtualFunctionPointers - Contains the number of virtual function
/// pointers in the vtable for a given record decl.
@@ -95,7 +96,11 @@
/// upon definition of a KeyFunction. This includes the vtable, the
/// rtti data structure and the VTT.
void GenerateClassData(const CXXRecordDecl *RD);
-
+
+ llvm::GlobalVariable *GenerateVtable(const CXXRecordDecl *LayoutClass,
+ const CXXRecordDecl *RD,
+ uint64_t Offset);
+
public:
CGVtableInfo(CodeGenModule &CGM)
: CGM(CGM) { }
@@ -118,9 +123,10 @@
/// FIXME: This should return a list of address points.
uint64_t getVtableAddressPoint(const CXXRecordDecl *RD);
- llvm::Constant *getVtable(const CXXRecordDecl *RD);
- llvm::Constant *getCtorVtable(const CXXRecordDecl *RD,
- const CXXRecordDecl *Class, uint64_t Offset);
+ llvm::GlobalVariable *getVtable(const CXXRecordDecl *RD);
+ llvm::GlobalVariable *getCtorVtable(const CXXRecordDecl *RD,
+ const CXXRecordDecl *Class,
+ uint64_t Offset);
void MaybeEmitVtable(GlobalDecl GD);