diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2016-06-24 21:21:46 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2016-06-24 21:21:46 +0000 |
commit | 8dd14da0dc02c95df4b826c94edd71f5514f1c19 (patch) | |
tree | ee8133d32bb8f37cdd22a10ad586407a072c5805 /clang/lib/CodeGen/CGVTables.cpp | |
parent | 7efd7506078fb48d0b901d33da38ea538cf2fa6a (diff) | |
download | bcm5719-llvm-8dd14da0dc02c95df4b826c94edd71f5514f1c19.tar.gz bcm5719-llvm-8dd14da0dc02c95df4b826c94edd71f5514f1c19.zip |
CodeGen: Update Clang to use the new type metadata.
Differential Revision: http://reviews.llvm.org/D21054
llvm-svn: 273730
Diffstat (limited to 'clang/lib/CodeGen/CGVTables.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGVTables.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/clang/lib/CodeGen/CGVTables.cpp b/clang/lib/CodeGen/CGVTables.cpp index 6f749056ad6..83974e0d214 100644 --- a/clang/lib/CodeGen/CGVTables.cpp +++ b/clang/lib/CodeGen/CGVTables.cpp @@ -709,7 +709,7 @@ CodeGenVTables::GenerateConstructionVTable(const CXXRecordDecl *RD, VTLayout->getNumVTableThunks(), RTTI); VTable->setInitializer(Init); - CGM.EmitVTableBitSetEntries(VTable, *VTLayout.get()); + CGM.EmitVTableTypeMetadata(VTable, *VTLayout.get()); return VTable; } @@ -933,8 +933,8 @@ bool CodeGenModule::HasHiddenLTOVisibility(const CXXRecordDecl *RD) { return true; } -void CodeGenModule::EmitVTableBitSetEntries(llvm::GlobalVariable *VTable, - const VTableLayout &VTLayout) { +void CodeGenModule::EmitVTableTypeMetadata(llvm::GlobalVariable *VTable, + const VTableLayout &VTLayout) { if (!getCodeGenOpts().PrepareForLTO) return; @@ -973,10 +973,7 @@ void CodeGenModule::EmitVTableBitSetEntries(llvm::GlobalVariable *VTable, return E1.second < E2.second; }); - llvm::NamedMDNode *BitsetsMD = - getModule().getOrInsertNamedMetadata("llvm.bitsets"); for (auto BitsetEntry : BitsetEntries) - CreateVTableBitSetEntry(BitsetsMD, VTable, - PointerWidth * BitsetEntry.second, - BitsetEntry.first); + AddVTableTypeMetadata(VTable, PointerWidth * BitsetEntry.second, + BitsetEntry.first); } |