From 2e32aaef378f9f098c9ce59bc26ddc8876c0199f Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Sat, 5 Dec 2009 20:58:49 +0000 Subject: [PATCH] Let the VTT builder pretend that getVtable returns a pointer to the vtable and not to the vtable address point. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90672 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGVtable.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/CodeGen/CGVtable.cpp b/lib/CodeGen/CGVtable.cpp index 6408853df3..e7f170f559 100644 --- a/lib/CodeGen/CGVtable.cpp +++ b/lib/CodeGen/CGVtable.cpp @@ -1264,7 +1264,7 @@ class VTTBuilder { VtblClass = RD; } - llvm::Constant *vtbl = dyn_cast(init->getOperand(0)); + llvm::Constant *vtbl = cast(init->getOperand(0)); Inits.push_back(init); // then the secondary VTTs.... @@ -1316,9 +1316,9 @@ public: 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(ClassVtbl->getOperand(0)); + ClassVtbl = cast(CGM.getVtableInfo().getVtable(Class) + ->getOperand(0)); + Inits.push_back(BuildVtablePtr(ClassVtbl, Class, Class, 0)); // then the secondary VTTs... SecondaryVTTs(Class); -- 2.50.1