[cfe-commits] r90673 - /cfe/trunk/lib/CodeGen/CGVtable.cpp
Anders Carlsson
andersca at mac.com
Sat Dec 5 13:02:25 PST 2009
Author: andersca
Date: Sat Dec 5 15:02:25 2009
New Revision: 90673
URL: http://llvm.org/viewvc/llvm-project?rev=90673&view=rev
Log:
Simplify BuildVTT.
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=90673&r1=90672&r2=90673&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGVtable.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVtable.cpp Sat Dec 5 15:02:25 2009
@@ -1251,27 +1251,26 @@
if (RD->getNumVBases() == 0 && !MorallyVirtual)
return;
- llvm::Constant *init;
- const CXXRecordDecl *VtblClass;
+ llvm::Constant *Vtable;
+ const CXXRecordDecl *VtableClass;
// First comes the primary virtual table pointer...
if (MorallyVirtual) {
- init = BuildVtablePtr(ClassVtbl, Class, RD, Offset);
- VtblClass = Class;
+ Vtable = ClassVtbl;
+ VtableClass = Class;
} else {
- init = CGM.getVtableInfo().getCtorVtable(Class, RD, Offset);
- init = BuildVtablePtr(init, RD, RD, Offset);
-
- VtblClass = RD;
+ Vtable = CGM.getVtableInfo().getCtorVtable(Class, RD, Offset);
+ VtableClass = RD;
}
- llvm::Constant *vtbl = cast<llvm::Constant>(init->getOperand(0));
- Inits.push_back(init);
+
+ llvm::Constant *Init = BuildVtablePtr(Vtable, VtableClass, RD, Offset);
+ Inits.push_back(Init);
// then the secondary VTTs....
SecondaryVTTs(RD, Offset, MorallyVirtual);
// and last the secondary vtable pointers.
- Secondary(RD, vtbl, VtblClass, Offset, MorallyVirtual);
+ Secondary(RD, Vtable, VtableClass, Offset, MorallyVirtual);
}
/// SecondaryVTTs - Add the secondary VTTs to Inits. The secondary VTTs are
More information about the cfe-commits
mailing list