diff options
author | John McCall <rjmccall@apple.com> | 2016-11-28 22:18:33 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2016-11-28 22:18:33 +0000 |
commit | 9c6cb7642e979ac32af14b7cf1c2c2a41610d43f (patch) | |
tree | 6ea707a3d181377773418a0827ba41c06bb03b94 /clang/lib/CodeGen/MicrosoftCXXABI.cpp | |
parent | f1788639c5f62beedd11adc40c144afff46b2a45 (diff) | |
download | bcm5719-llvm-9c6cb7642e979ac32af14b7cf1c2c2a41610d43f.tar.gz bcm5719-llvm-9c6cb7642e979ac32af14b7cf1c2c2a41610d43f.zip |
Make CGVTables use ConstantInitBuilder. NFC.
llvm-svn: 288081
Diffstat (limited to 'clang/lib/CodeGen/MicrosoftCXXABI.cpp')
-rw-r--r-- | clang/lib/CodeGen/MicrosoftCXXABI.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/MicrosoftCXXABI.cpp b/clang/lib/CodeGen/MicrosoftCXXABI.cpp index c87ac40972c..5947fd7ebf1 100644 --- a/clang/lib/CodeGen/MicrosoftCXXABI.cpp +++ b/clang/lib/CodeGen/MicrosoftCXXABI.cpp @@ -19,6 +19,7 @@ #include "CGVTables.h" #include "CodeGenModule.h" #include "CodeGenTypes.h" +#include "ConstantBuilder.h" #include "TargetInfo.h" #include "clang/AST/Decl.h" #include "clang/AST/DeclCXX.h" @@ -1584,9 +1585,10 @@ void MicrosoftCXXABI::emitVTableDefinitions(CodeGenVTables &CGVT, [](const VTableComponent &VTC) { return VTC.isRTTIKind(); })) RTTI = getMSCompleteObjectLocator(RD, *Info); - llvm::Constant *Init = CGVT.CreateVTableInitializer(VTLayout, RTTI); - - VTable->setInitializer(Init); + ConstantInitBuilder Builder(CGM); + auto Components = Builder.beginArray(CGM.Int8PtrTy); + CGVT.createVTableInitializer(Components, VTLayout, RTTI); + Components.finishAndSetAsInitializer(VTable); emitVTableTypeMetadata(*Info, RD, VTable); } |