diff options
author | Anders Carlsson <andersca@mac.com> | 2011-01-29 19:16:51 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2011-01-29 19:16:51 +0000 |
commit | 1cbce125b91cad81c8be3f8bbae8df917211176c (patch) | |
tree | 069a00838664a0b905a83f260f8a2d05ecd4f586 /lib/CodeGen/CGVTables.cpp | |
parent | 96eaf2992b5955d1470fc9cce7a96e7e1e3b4ea7 (diff) |
Make emitting a VTT a two-step process, much like emitting a VTable. You first get the address of the VTT, and then pass it to EmitVTTDefinition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124539 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGVTables.cpp')
-rw-r--r-- | lib/CodeGen/CGVTables.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/CGVTables.cpp b/lib/CodeGen/CGVTables.cpp index 0ff41bb354..ad2269418b 100644 --- a/lib/CodeGen/CGVTables.cpp +++ b/lib/CodeGen/CGVTables.cpp @@ -3040,7 +3040,10 @@ CodeGenVTables::GenerateClassData(llvm::GlobalVariable::LinkageTypes Linkage, VTable = GetAddrOfVTable(RD); EmitVTableDefinition(VTable, Linkage, RD); - GenerateVTT(Linkage, /*GenerateDefinition=*/true, RD); + if (RD->getNumVBases()) { + llvm::GlobalVariable *VTT = GetAddrOfVTT(RD); + EmitVTTDefinition(VTT, Linkage, RD); + } // If this is the magic class __cxxabiv1::__fundamental_type_info, // we will emit the typeinfo for the fundamental types. This is the |