[cfe-commits] r90672 - /cfe/trunk/lib/CodeGen/CGVtable.cpp
Anders Carlsson
andersca at mac.com
Sat Dec 5 12:58:49 PST 2009
Author: andersca
Date: Sat Dec 5 14:58:49 2009
New Revision: 90672
URL: http://llvm.org/viewvc/llvm-project?rev=90672&view=rev
Log:
Let the VTT builder pretend that getVtable returns a pointer to the vtable and not to the vtable address point.
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=90672&r1=90671&r2=90672&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGVtable.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVtable.cpp Sat Dec 5 14:58:49 2009
@@ -1264,7 +1264,7 @@
VtblClass = RD;
}
- llvm::Constant *vtbl = dyn_cast<llvm::Constant>(init->getOperand(0));
+ llvm::Constant *vtbl = cast<llvm::Constant>(init->getOperand(0));
Inits.push_back(init);
// then the secondary VTTs....
@@ -1316,9 +1316,9 @@
VMContext(cgm.getModule().getContext()) {
// First comes the primary virtual table pointer for the complete class...
- ClassVtbl = CGM.getVtableInfo().getVtable(Class);
- Inits.push_back(ClassVtbl);
- ClassVtbl = dyn_cast<llvm::Constant>(ClassVtbl->getOperand(0));
+ ClassVtbl = cast<llvm::Constant>(CGM.getVtableInfo().getVtable(Class)
+ ->getOperand(0));
+ Inits.push_back(BuildVtablePtr(ClassVtbl, Class, Class, 0));
// then the secondary VTTs...
SecondaryVTTs(Class);
More information about the cfe-commits
mailing list