summaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/CGVTables.h
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2016-11-28 22:18:33 +0000
committerJohn McCall <rjmccall@apple.com>2016-11-28 22:18:33 +0000
commit01a821e2b6d7be3e171f07c232a9e9b40e634986 (patch)
tree5a1f2a0aceaa46f984e414fbdcea6761a2dc0dcc /lib/CodeGen/CGVTables.h
parent16470410c1ef21b31c5f80f7179beda84fd664bf (diff)
Make CGVTables use ConstantInitBuilder. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288081 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGVTables.h')
-rw-r--r--lib/CodeGen/CGVTables.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/CodeGen/CGVTables.h b/lib/CodeGen/CGVTables.h
index be58446dbe..1d06832c46 100644
--- a/lib/CodeGen/CGVTables.h
+++ b/lib/CodeGen/CGVTables.h
@@ -27,6 +27,7 @@ namespace clang {
namespace CodeGen {
class CodeGenModule;
+ class ConstantArrayBuilder;
class CodeGenVTables {
CodeGenModule &CGM;
@@ -62,16 +63,17 @@ class CodeGenVTables {
/// the ABI.
void maybeEmitThunkForVTable(GlobalDecl GD, const ThunkInfo &Thunk);
- llvm::Constant *CreateVTableComponent(unsigned Idx,
- const VTableLayout &VTLayout,
- llvm::Constant *RTTI,
- unsigned &NextVTableThunkIndex);
+ void addVTableComponent(ConstantArrayBuilder &builder,
+ const VTableLayout &layout, unsigned idx,
+ llvm::Constant *rtti,
+ unsigned &nextVTableThunkIndex);
public:
- /// CreateVTableInitializer - Create a vtable initializer with the given
- /// layout.
- llvm::Constant *CreateVTableInitializer(const VTableLayout &VTLayout,
- llvm::Constant *RTTI);
+ /// Add vtable components for the given vtable layout to the given
+ /// global initializer.
+ void createVTableInitializer(ConstantArrayBuilder &builder,
+ const VTableLayout &layout,
+ llvm::Constant *rtti);
CodeGenVTables(CodeGenModule &CGM);