[cfe-commits] r86699 - /cfe/trunk/lib/CodeGen/CGVtable.cpp
Mike Stump
mrs at apple.com
Tue Nov 10 11:13:04 PST 2009
Author: mrs
Date: Tue Nov 10 13:13:04 2009
New Revision: 86699
URL: http://llvm.org/viewvc/llvm-project?rev=86699&view=rev
Log:
Only generate a VTT for classes that need a VTT.
Modified:
cfe/trunk/lib/CodeGen/CGVtable.cpp
Modified: cfe/trunk/lib/CodeGen/CGVtable.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGVtable.cpp?rev=86699&r1=86698&r2=86699&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGVtable.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVtable.cpp Tue Nov 10 13:13:04 2009
@@ -733,6 +733,10 @@
};
llvm::Constant *CodeGenModule::GenerateVTT(const CXXRecordDecl *RD) {
+ // Only classes that have virtual bases need a VTT.
+ if (RD->getNumVBases() == 0)
+ return 0;
+
llvm::SmallString<256> OutName;
llvm::raw_svector_ostream Out(OutName);
mangleCXXVTT(getMangleContext(), RD, Out);
More information about the cfe-commits
mailing list